From 49fc2134d6d0c0061ea2335ea85e27a23f1a7612 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Tue, 19 Apr 2016 12:08:00 +0200 Subject: Vertex count. --- phstuff/simplicial.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phstuff/simplicial.py b/phstuff/simplicial.py index 6614bf7..74b520f 100644 --- a/phstuff/simplicial.py +++ b/phstuff/simplicial.py @@ -144,6 +144,9 @@ class Complex: def __len__(self): return self.__count + def num_vertices(self): + return len(self.__root.keys()) + # Very naive temporary VR implementations. def naive_vr_tmp(graph, top_dim): assert(graph.shape[0] == graph.shape[1]) -- cgit v1.2.3