Inheritance diagram for nipy.neurospin.graph.graph:
Graph routines. Author: Bertrand Thirion (INRIA Futurs, Orsay, France), 2004-2008.
Bases: nipy.neurospin.graph.graph.WeightedGraph
This is a bipartite graph structure, i.e. a graph there are two types of nodes, such that edges can exist only between nodes of type 1 and type 2 (not within) fields: - V (int,>0) the number of type 1 vertices - W (int,>0) the number of type 2 vertices - E : (int) the number of edges - edges: array of shape (self.E,2) reprensenting pairwise neighbors - weights, array of shape (self.E), +1/-1 for scending/descending links
E = self.cross_knn(X,Y,k) set the graph to be the k-nearest-neighbours graph of from X to Y INPUT:
- The arrays X,Y is assumed to be of size (self.V) or (self.V,p)
and (self.W) or (self.W,p) respectively where p = dimension of the features - k=1 : is the number of neighbours considered OUTPUT: - the number of edges of the resulting graph, self.E NB: - It is assumed that the features are embedded in a (locally) Euclidian space - for the sake of speed it is advisable to give a PCA-preprocessed matrices X and Y.
Bases: nipy.neurospin.graph.graph.WeightedGraph
This is a Forest structure, i.e. a set of trees - the nodes can be segmented into trees - within each tree a node has one parent and children (hierarchical structure) - some of the nodes can be viewed as leaves, other as roots - the edges within a tree are associated with a weight: +1 from child to parent -1 from parent to child
fields: - V : (int,>0) the number of vertices - E : (int) the number of edges - parents: array of shape (self.V) the parent array - edges: array of shape (self.E,2) reprensenting pairwise neighbors - weights, array of shape (self.E), +1/-1 for scending/descending links - children: list of arrays that represents the childs of any node
This is the basic topological (non-weighted) directed Graph class fields : - V(int) = the number of vertices - E(int) = the number of edges - edges = array of int with shape (E,2) : the edges of the graph
Bases: nipy.neurospin.graph.graph.Graph
This is the basic weighted, directed graph class implemented in fff fields : - V(int) = the number of vertices - E(int) = the number of edges - edges = array of int with shape (E,2) : the edges of the graph - weihghts = array of int with shape (E) : the weights/length of the graph edges