class_docstr: 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
  that describe the associated 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
  
  Attributes
  ----------
  V : int
      int > 0, the number of vertices
  E : int
      the number of edges
  parents : (self.V,) array
      the parent array
  edges : (self.E, 2) array
      representing pairwise neighbors
  weights : (self.E,) array
      +1/-1 for ascending/descending links
  children: list
      list of arrays that represents the children any node
class_docstr_tok: ["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","that","describe","the","associated","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","Attributes","--","--","--","--","--","V",":","int","int",">","0",",","the","number","of","vertices","E",":","int","the","number","of","edges","parents",":","(","self.V",",",")","array","the","parent","array","edges",":","(","self.E",",","2",")","array","representing","pairwise","neighbors","weights",":","(","self.E",",",")","array","+1\/-1","for","ascending\/descending","links","children",":","list","list","of","arrays","that","represents","the","children","any","node"]
docstr: returns all the distances of the graph  as a tree
  
  Parameters
  ----------
  seed=None array of shape(nbseed)  with valuesin [0..self.V-1]
            set of vertices from which tehe distances are computed
  
  Returns
  -------
  dg: array of shape(nseed, self.V), the resulting distances
  
  Notes
  -----
  By convention infinite distances are given the distance np.inf
docstr_tok: ["returns","all","the","distances","of","the","graph","as","a","tree","Parameters","--","--","--","--","--","seed=None","array","of","shape","(","nbseed",")","with","valuesin","[","0","..","self.V-1","]","set","of","vertices","from","which","tehe","distances","are","computed","Returns","--","--","--","-","dg",":","array","of","shape","(","nseed",",","self.V",")",",","the","resulting","distances","Notes","--","--","-","By","convention","infinite","distances","are","given","the","distance","np.inf"]
code: def all_distances(self, seed=None):
      """returns all the distances of the graph  as a tree
  
      Parameters
      ----------
      seed=None array of shape(nbseed)  with valuesin [0..self.V-1]
                set of vertices from which tehe distances are computed
  
      Returns
      -------
      dg: array of shape(nseed, self.V), the resulting distances
  
      Notes
      -----
      By convention infinite distances are given the distance np.inf
      """
      if (hasattr(seed, "__iter__") == False) & (seed is not None):
          seed = [seed]
  
      if self.E > 0:
          w = self.weights.copy()
          self.weights = np.absolute(self.weights)
          dg = self.floyd(seed)
          dg[dg == (np.sum(self.weights) + 1)] = np.inf
          self.weights = w
          return dg
      else:
          return np.inf * np.ones((self.V, self.V))
  
imports: import numpy
  from .graph import WeightedGraph
label_desc: Use image node_id 11 for calling the Forest obj's underlying member method code with example usage: obj.all_distances(seed) and returns: dg, unknown