class_docstr: Basic weighted, directed graph class
  
  Member variables:
  
  * V (int): the number of vertices
  * E (int): the number of edges
  
  Methods
  
  * vertices (list, type=int, shape=(V,)): vertices id
  * edges (list, type=int, shape=(E,2)): edges as vertices id tuples
  * weights (list, type=int, shape=(E,)): weights / lengths
    of the graph's edges
class_docstr_tok: ["Basic","weighted",",","directed","graph","class","Member","variables",":","*","V","(","int",")",":","the","number","of","vertices","*","E","(","int",")",":","the","number","of","edges","Methods","*","vertices","(","list",",","type=int",",","shape=","(","V",",",")",")",":","vertices","id","*","edges","(","list",",","type=int",",","shape=","(","E,2",")",")",":","edges","as","vertices","id","tuples","*","weights","(","list",",","type=int",",","shape=","(","E",",",")",")",":","weights","\/","lengths","of","the","graph","'s","edges"]
docstr: Compute all the geodesic distances starting from seeds
  
  Parameters
  ----------
  seed= None: array of shape (nbseed), type np.int_
       vertex indexes from which the distances are computed
       if seed==None, then every edge is a seed point
  
  Returns
  -------
  dg array of shape (nbseed, self.V)
          the graph distance dg from each seed to any vertex
  
  Notes
  -----
  It is mandatory that the graph weights are non-negative. The algorithm
  proceeds by repeating Dijkstra's algo for each seed. Floyd's algo is not
  used (O(self.V)^3 complexity...)
docstr_tok: ["Compute","all","the","geodesic","distances","starting","from","seeds","Parameters","--","--","--","--","--","seed=","None",":","array","of","shape","(","nbseed",")",",","type","np.int_","vertex","indexes","from","which","the","distances","are","computed","if","seed==None",",","then","every","edge","is","a","seed","point","Returns","--","--","--","-","dg","array","of","shape","(","nbseed",",","self.V",")","the","graph","distance","dg","from","each","seed","to","any","vertex","Notes","--","--","-","It","is","mandatory","that","the","graph","weights","are","non-negative",".","The","algorithm","proceeds","by","repeating","Dijkstra","'s","algo","for","each","seed",".","Floyd","'s","algo","is","not","used","(","O","(","self.V",")","^3","complexity","...",")"]
code: def floyd(self, seed=None):
      """Compute all the geodesic distances starting from seeds
  
      Parameters
      ----------
      seed= None: array of shape (nbseed), type np.int_
           vertex indexes from which the distances are computed
           if seed==None, then every edge is a seed point
  
      Returns
      -------
      dg array of shape (nbseed, self.V)
              the graph distance dg from each seed to any vertex
  
      Notes
      -----
      It is mandatory that the graph weights are non-negative. The algorithm
      proceeds by repeating Dijkstra's algo for each seed. Floyd's algo is not
      used (O(self.V)^3 complexity...)
      """
      if seed is None:
          seed = np.arange(self.V)
      dg = None
      for s in seed:
          if dg is None:
              dg = self.dijkstra(s)
          else:
              dg = np.vstack((dg, self.dijkstra(s)))
      return dg
  
imports: import numpy
  from scipy.sparse import coo_matrix
label_desc: Use image node_id 8 for calling the WeightedGraph obj's underlying member method code with example usage: obj.floyd(seed) and returns: dg