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: returns a compact representation of self
  
  Returns
  -------
  idx: array of of shape(self.V + 1):
       the positions where to find the neighbors of each node
       within neighb and weights
  neighb: array of shape(self.E), concatenated list of neighbors
  weights: array of shape(self.E), concatenated list of weights
docstr_tok: ["returns","a","compact","representation","of","self","Returns","--","--","--","-","idx",":","array","of","of","shape","(","self.V","+","1",")",":","the","positions","where","to","find","the","neighbors","of","each","node","within","neighb","and","weights","neighb",":","array","of","shape","(","self.E",")",",","concatenated","list","of","neighbors","weights",":","array","of","shape","(","self.E",")",",","concatenated","list","of","weights"]
code: def compact_neighb(self):
      """returns a compact representation of self
  
      Returns
      -------
      idx: array of of shape(self.V + 1):
           the positions where to find the neighbors of each node
           within neighb and weights
      neighb: array of shape(self.E), concatenated list of neighbors
      weights: array of shape(self.E), concatenated list of weights
      """
      order = np.argsort(
          self.edges[:, 0] * float(self.V) + self.edges[:, 1]
      )
      neighb = self.edges[order, 1].astype(np.int_)
      weights = self.weights[order]
      degree, _ = self.degrees()
      idx = np.hstack((0, np.cumsum(degree))).astype(np.int_)
      return idx, neighb, weights
  
imports: import numpy
  from scipy.sparse import coo_matrix
label_desc: Use image node_id 7 for calling the WeightedGraph obj's underlying member method code with example usage: obj.compact_neighb() and returns: idx,  neighb,  weights