C# Class Smrf.NodeXL.Adapters.UcinetGraphAdapter

Converts a graph to and from a UCINET full matrix DL file.
Use the LoadGraph(String, GraphDirectedness) overload instead of one of the base-class overloads so that the directedness of the UCINET file being loaded can be specified.

Before calling GraphAdapterBase.SaveGraph(IGraph, String), duplicate edges must be merged and the results stored in the value on each vertex.

The only file format supported is the UCINET full matrix DL file, as exported by UCINET version 6.223. The file looks like this:

DL N=11 FORMAT = FULLMATRIX DIAGONAL PRESENT ROW LABELS: "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" COLUMN LABELS: "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" DATA: 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0
Inheritance: GraphAdapterBase, IGraphAdapter
Afficher le fichier Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Свойство Type Description
StreamEncoding Encoding
m_eLoadedGraphDirectedness GraphDirectedness

Méthodes publiques

Méthode Description
AssertValid ( ) : void
LoadGraph ( String filename, GraphDirectedness fileDirectedness ) : IGraph
UcinetGraphAdapter ( ) : System

Initializes a new instance of the UcinetGraphAdapter class.

Méthodes protégées

Méthode Description
AddLoadedVertex ( String sVertexName, IVertexCollection oVertices, IVertex>.Dictionary oVertexDictionary ) : void
GetSupportedDirectedness ( Boolean &supportsDirected, Boolean &supportsUndirected, Boolean &supportsMixed ) : void
LoadGraphCore ( Stream stream ) : IGraph
LoadGraphEdges ( IGraph oGraph, StreamReader oStreamReader, IVertex>.Dictionary oVertexDictionary, Int32 &iLineNumber ) : void
SaveGraphCore ( IGraph graph, Stream stream ) : void

Method Details

AddLoadedVertex() protected méthode

protected AddLoadedVertex ( String sVertexName, IVertexCollection oVertices, IVertex>.Dictionary oVertexDictionary ) : void
sVertexName String
oVertices IVertexCollection
oVertexDictionary IVertex>.Dictionary
Résultat void

AssertValid() public méthode

public AssertValid ( ) : void
Résultat void

GetSupportedDirectedness() protected méthode

protected GetSupportedDirectedness ( Boolean &supportsDirected, Boolean &supportsUndirected, Boolean &supportsMixed ) : void
supportsDirected Boolean
supportsUndirected Boolean
supportsMixed Boolean
Résultat void

LoadGraph() public méthode

public LoadGraph ( String filename, GraphDirectedness fileDirectedness ) : IGraph
filename String
fileDirectedness GraphDirectedness
Résultat IGraph

LoadGraphCore() protected méthode

protected LoadGraphCore ( Stream stream ) : IGraph
stream Stream
Résultat IGraph

LoadGraphEdges() protected méthode

protected LoadGraphEdges ( IGraph oGraph, StreamReader oStreamReader, IVertex>.Dictionary oVertexDictionary, Int32 &iLineNumber ) : void
oGraph IGraph
oStreamReader StreamReader
oVertexDictionary IVertex>.Dictionary
iLineNumber Int32
Résultat void

SaveGraphCore() protected méthode

protected SaveGraphCore ( IGraph graph, Stream stream ) : void
graph IGraph
stream Stream
Résultat void

UcinetGraphAdapter() public méthode

Initializes a new instance of the UcinetGraphAdapter class.
public UcinetGraphAdapter ( ) : System
Résultat System

Property Details

StreamEncoding protected_oe static_oe property

protected static Encoding StreamEncoding
Résultat Encoding

m_eLoadedGraphDirectedness protected_oe property

protected GraphDirectedness m_eLoadedGraphDirectedness
Résultat GraphDirectedness