Changeset 7838:c911c2159a32 in orange


Ignore:
Timestamp:
04/13/11 17:05:35 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
dc3a283f5b5564924d73c6605d25aae956be402b
Message:
 
Location:
orange/Orange/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/network/__init__.py

    r7837 r7838  
    558558import random 
    559559import os 
    560 import sys 
    561560 
    562561import Orange.core 
  • orange/Orange/network/network.py

    r7836 r7838  
    5050        BaseGraph.__init__(self) 
    5151         
    52     a__init__.__doc__ = nx.Graph.__init__.__doc__ 
     52    __init__.__doc__ = nx.Graph.__init__.__doc__ 
    5353      
    5454class DiGraph(BaseGraph, nx.DiGraph): 
  • orange/Orange/network/readwrite.py

    r7833 r7838  
    88 
    99def read_pajek(path,encoding='UTF-8'): 
    10     """Read graph in Pajek format from path.  
     10    return rw.read_pajek(path, encoding) 
    1111 
    12     Parameters 
    13     ---------- 
    14     path : file or string 
    15        File or filename to write.   
    16        Filenames ending in .gz or .bz2 will be uncompressed. 
    17  
    18     Returns 
    19     ------- 
    20     G : NetworkX MultiGraph or MultiDiGraph. 
    21  
    22     Examples 
    23     -------- 
    24     >>> G=nx.path_graph(4) 
    25     >>> nx.write_pajek(G, "test.net") 
    26     >>> G=nx.read_pajek("test.net") 
    27  
    28     To create a Graph instead of a MultiGraph use 
    29  
    30     >>> G1=nx.Graph(G) 
    31  
    32     References 
    33     ---------- 
    34     See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm 
    35     for format information. 
    36     """ 
    37     return rw.read_pajek(path, encoding) 
    38      
    3912def parse_pajek(lines): 
    40     """Parse Pajek format graph from string or iterable. 
    41  
    42     Parameters 
    43     ---------- 
    44     lines : string or iterable 
    45        Data in Pajek format. 
    46  
    47     Returns 
    48     ------- 
    49     G : NetworkX graph 
    50  
    51     See Also 
    52     -------- 
    53     read_pajek() 
    54  
    55     """ 
    5613    G = rw.parse_pajek(lines) 
    5714     
     
    6219         
    6320    return G 
     21 
     22read_pajek.__doc__ = rw.read_pajek.__doc__ 
     23parse_pajek.__doc__ = rw.parse_pajek.__doc__ 
Note: See TracChangeset for help on using the changeset viewer.