C# Class Smrf.NodeXL.Adapters.SimpleGraphAdapter

Converts a graph to and from a simple two-name pair format.
The two-name format consists of one line of text per edge, where each line specifies the names of the vertices connected by the edge. This is the format of each line: Vertex1Name{tab}Vertex2Name

The delimiter is a tab, and the vertex names can consist of any Unicode characters, including leading, trailing, and embedded spaces.

This adapter can be used with directed graphs only.

Inheritance: GraphAdapterBase, IGraphAdapter
Mostrar archivo Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
StreamEncoding System.Text.Encoding

Public Methods

Method Description
AssertValid ( ) : void
SimpleGraphAdapter ( ) : System

Initializes a new instance of the SimpleGraphAdapter class.

Protected Methods

Method Description
GetSupportedDirectedness ( System.Boolean &supportsDirected, System.Boolean &supportsUndirected, System.Boolean &supportsMixed ) : void
LoadGraphCore ( Stream stream ) : IGraph
SaveGraphCore ( IGraph graph, Stream stream ) : void
VertexNameIsValid ( String sVertexName ) : System.Boolean
VertexNameToVertex ( String sVertexName, IVertexCollection oVertices, IVertex>.Dictionary oDictionary ) : IVertex
VertexToVertexName ( IVertex oVertex ) : String

Method Details

AssertValid() public method

public AssertValid ( ) : void
return void

GetSupportedDirectedness() protected method

protected GetSupportedDirectedness ( System.Boolean &supportsDirected, System.Boolean &supportsUndirected, System.Boolean &supportsMixed ) : void
supportsDirected System.Boolean
supportsUndirected System.Boolean
supportsMixed System.Boolean
return void

LoadGraphCore() protected method

protected LoadGraphCore ( Stream stream ) : IGraph
stream Stream
return IGraph

SaveGraphCore() protected method

protected SaveGraphCore ( IGraph graph, Stream stream ) : void
graph IGraph
stream Stream
return void

SimpleGraphAdapter() public method

Initializes a new instance of the SimpleGraphAdapter class.
public SimpleGraphAdapter ( ) : System
return System

VertexNameIsValid() protected method

protected VertexNameIsValid ( String sVertexName ) : System.Boolean
sVertexName String
return System.Boolean

VertexNameToVertex() protected method

protected VertexNameToVertex ( String sVertexName, IVertexCollection oVertices, IVertex>.Dictionary oDictionary ) : IVertex
sVertexName String
oVertices IVertexCollection
oDictionary IVertex>.Dictionary
return IVertex

VertexToVertexName() protected method

protected VertexToVertexName ( IVertex oVertex ) : String
oVertex IVertex
return String

Property Details

StreamEncoding protected_oe static_oe property

protected static Encoding,System.Text StreamEncoding
return System.Text.Encoding