class_docstr: Basic topological (non-weighted) directed Graph class
  
  Member variables:
  
  * V (int > 0): the number of vertices
  * E (int >= 0): the number of edges
  
  Properties:
  
  * vertices (list, type=int, shape=(V,))  vertices id
  * edges (list, type=int, shape=(E,2)): edges as vertices id tuples
class_docstr_tok: ["Basic","topological","(","non-weighted",")","directed","Graph","class","Member","variables",":","*","V","(","int",">","0",")",":","the","number","of","vertices","*","E","(","int",">","=","0",")",":","the","number","of","edges","Properties",":","*","vertices","(","list",",","type=int",",","shape=","(","V",",",")",")","vertices","id","*","edges","(","list",",","type=int",",","shape=","(","E,2",")",")",":","edges","as","vertices","id","tuples"]
docstr: Sets the graph's edges
  
  Preconditions:
  
  * edges has a correct size
  * edges take values in [1..V]
docstr_tok: ["Sets","the","graph","'s","edges","Preconditions",":","*","edges","has","a","correct","size","*","edges","take","values","in","[","1","..","V","]"]
code: def set_edges(self, edges):
      """Sets the graph's edges
  
      Preconditions:
  
      * edges has a correct size
      * edges take values in [1..V]
      """
      if not isinstance(edges, None.__class__) and (edges.size != 0):
          if (np.shape(edges)[0] != self.E) or (
              np.shape(edges)[1] != 2
          ):
              raise ValueError("Incompatible size of the edge matrix")
          if edges.max() + 1 > self.V:
              raise ValueError("Incorrect edge specification")
          self.edges = edges
      else:
          self.edges = []
  
imports: import numpy
  from scipy.sparse import coo_matrix
label_desc: Use image node_id 8 for calling the Graph obj's underlying member method code with example usage: obj.set_edges(edges) without return types