Statistics for Infinite graphs, graph-like spaces and B-matroids