Topologic  0.8.9
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Topologic::Graph Class Reference

A Graph consists of a set of Vertices and a set of Edges that connect the Vertices. It is always a Cluster and it can be manifold or non-manifold. More...

#include <Graph.h>

Public Member Functions

List< Vertex^> ^ VerticesAtCoordinates (double x, double y, double z, double tolerance)
 Returns a list of Vertices in the Graph located at the input coordinates within the input tolerance distance. More...
 
GraphAddVertices (List< Vertex^>^ vertices, double tolerance)
 Adds the list of Vertices to the Graph. If a tolerance is specified, the Vertices will be merged with existing Vertices within the input tolerance distance. A zero or null tolerance means that the Vertices will be added to the Graph regardless of their overlap with existing Vertices. More...
 
GraphAddEdges (List< Edge^>^ edges, double tolerance)
 Adds the list of Edges to the Graph. The Vertices of the Edges are merged with existing Vertices if they fall within the input tolerance. No new Edges will be added if they already exist. A zero or null tolerance means that the Vertices of the input Edges will be added to the Graph regardless of their overlap with existing Vertices. More...
 
GraphConnect (Vertex^ vertex1, Vertex^ vertex2, double tolerance)
 Connects the two input Vertices with an Edge. More...
 
int VertexDegree (Vertex^ vertex)
 Returns the number of Edges connected to the input Vertex. More...
 
List< Vertex^> ^ AdjacentVertices (Vertex^ vertex)
 Returns a list of Vertices that are connected to the input Vertex by an Edge. More...
 
bool ContainsVertex (Vertex^ vertex, double tolerance)
 Returns True if the input Graph contains the input Vertex. Returns False otherwise. More...
 
bool ContainsEdge (Edge^ edge, double tolerance)
 Returns True if the input Graph contains the input Edge. Returns False otherwise. More...
 
List< Wire^> ^ AllPaths (Vertex^ startVertex, Vertex^ endVertex, Nullable< int > timeLimitInSeconds)
 Returns all paths it could find, within the input number of seconds, that connect the two input Vertices. More...
 
WirePath (Vertex^ startVertex, Vertex^ endVertex)
 Returns the first Path found between the input Vertices. More...
 
WireShortestPath (Vertex^ startVertex, Vertex^ endVertex, String^ vertexKey, String^ edgeKey)
 Returns the path with the fewest number of Edges between the two input Vertices. More...
 
List< Wire^> ^ ShortestPaths (Vertex^ startVertex, Vertex^ endVertex, String^ vertexKey, String^ edgeKey, Nullable< int > timeLimitInSeconds)
 Returns all paths with the fewest number of Edges between the two input Vertices. More...
 
int TopologicalDistance (Vertex^ startVertex, Vertex^ endVertex)
 Returns the number of Edges of the shortest path connecting the two input Vertices. More...
 
bool IsErdoesGallai (List< int >^ sequence)
 Returns True if the input sequence satisfies the Erdoes Gallai theorem. It returns False otherwise. More...
 
GraphRemoveVertices (List< Vertex^>^ vertices)
 Removes the input Vertices from the Graph. More...
 
GraphRemoveEdges (List< Edge^>^ edges)
 Removes the input Edges from the Graph. More...
 
EdgeEdge (Vertex^ vertex1, Vertex^ vertex2, double tolerance)
 Returns the Edge, if one exists, that connects the two input Vertices. More...
 
List< Topologic::Edge^> ^ IncidentEdges (Vertex^ vertex, double tolerance)
 Returns a list of all Edges connected to the input Vertex. More...
 

Static Public Member Functions

static GraphByTopology (Topology^ topology, bool direct, bool viaSharedTopologies, bool viaSharedApertures, bool toExteriorTopologies, bool toExteriorApertures, bool useFaceInternalVertex, double tolerance)
 Creates a Graph from any Topology. More...
 

Protected Member Functions

 Graph (const std::shared_ptr< TopologicCore::Graph > &kpCoreGraph)
 

Protected Attributes

std::shared_ptr< TopologicCore::Graph > * m_pCoreGraph
 

Properties

List< Vertex^>^ Vertices [get]
 Returns a list of all the Vertices in a Graph. More...
 
List< Vertex^>^ IsolatedVertices [get]
 Returns a list of Vertices that are not connected by Edges. More...
 
List< Edge^>^ Edges [get]
 Returns a list of all the Edges in a Graph. More...
 
TopologyTopology [get]
 Returns the Topology of the Graph. More...
 
List< int >^ DegreeSequence [get]
 Returns a list of Vertex degrees in a non-increasing order. More...
 
double Density [get]
 Returns the ratio of the number of Edges to the total number of Edges the Graph could have. More...
 
bool IsComplete [get]
 Returns True if the Graph has a density of 1. Returns False otherwise. More...
 
int MinimumDelta [get]
 Returns the minimum Vertex degree in a Graph. More...
 
int MaximumDelta [get]
 Returns the maximum Vertex degree in a Graph. More...
 
int Diameter [get]
 Returns the number of Edges of the shortest path between the most distanced Vertices. More...
 

Detailed Description

A Graph consists of a set of Vertices and a set of Edges that connect the Vertices. It is always a Cluster and it can be manifold or non-manifold.

Member Function Documentation

◆ AddEdges()

Graph Topologic::Graph::AddEdges ( List< Edge^>^  edges,
double  tolerance 
)

Adds the list of Edges to the Graph. The Vertices of the Edges are merged with existing Vertices if they fall within the input tolerance. No new Edges will be added if they already exist. A zero or null tolerance means that the Vertices of the input Edges will be added to the Graph regardless of their overlap with existing Vertices.

Parameters
edgesThe Edges to be added
toleranceA positive tolerance value
Returns
The Graph after the Edges are added

◆ AddVertices()

Graph Topologic::Graph::AddVertices ( List< Vertex^>^  vertices,
double  tolerance 
)

Adds the list of Vertices to the Graph. If a tolerance is specified, the Vertices will be merged with existing Vertices within the input tolerance distance. A zero or null tolerance means that the Vertices will be added to the Graph regardless of their overlap with existing Vertices.

Parameters
verticesThe Vertices to be added
toleranceA positive tolerance value
Returns
The Graph after the Vertices are added

◆ AdjacentVertices()

List< Vertex^> Topologic::Graph::AdjacentVertices ( Vertex vertex)

Returns a list of Vertices that are connected to the input Vertex by an Edge.

Parameters
vertexThe input Vertex
Returns
A list of the Vertices adjacent to a Vertex

◆ AllPaths()

List< Wire^> Topologic::Graph::AllPaths ( Vertex startVertex,
Vertex endVertex,
Nullable< int >  timeLimitInSeconds 
)

Returns all paths it could find, within the input number of seconds, that connect the two input Vertices.

Parameters
startVertexThe start Vertex
endVertexThe end Vertex
timeLimitInSecondsTime limit in seconds
Returns
A list of paths

◆ ByTopology()

Graph Topologic::Graph::ByTopology ( Topology topology,
bool  direct,
bool  viaSharedTopologies,
bool  viaSharedApertures,
bool  toExteriorTopologies,
bool  toExteriorApertures,
bool  useFaceInternalVertex,
double  tolerance 
)
static

Creates a Graph from any Topology.

Parameters
directUse the centroids of the Topologies
viaSharedTopologiesUse shared Topologies
viaSharedAperturesUse shared Apertures
toExteriorTopologiesUse exterior Topologies
toExteriorAperturesUse exterior Apertures
useFaceInternalVertexUse the Faces' internal Vertices. WARNING: This process can take considerable time.
toleranceA positive tolerance value
Returns
The created Graph

◆ Connect()

Graph Topologic::Graph::Connect ( Vertex vertex1,
Vertex vertex2,
double  tolerance 
)

Connects the two input Vertices with an Edge.

Parameters
vertex1The first Vertex
vertex2The second Vertex
toleranceA positive tolerance value
Returns
The Graph after the Vertices are connected

◆ ContainsEdge()

bool Topologic::Graph::ContainsEdge ( Edge edge,
double  tolerance 
)

Returns True if the input Graph contains the input Edge. Returns False otherwise.

Parameters
edgeThe input Edge
toleranceA positive tolerance value
Returns
True if the input Graph contains the input Edge, False otherwise

◆ ContainsVertex()

bool Topologic::Graph::ContainsVertex ( Vertex vertex,
double  tolerance 
)

Returns True if the input Graph contains the input Vertex. Returns False otherwise.

Parameters
vertexThe input Vertex
toleranceA positive tolerance value
Returns
True if the input Graph contains the input Vertex, False otherwise

◆ Edge()

Edge Topologic::Graph::Edge ( Vertex vertex1,
Vertex vertex2,
double  tolerance 
)

Returns the Edge, if one exists, that connects the two input Vertices.

Parameters
vertex1The first Vertex
vertex2The second Vertex
toleranceA positive tolerance value
Returns
The Edge connecting the two Vertices

◆ IncidentEdges()

List< Edge^> Topologic::Graph::IncidentEdges ( Vertex vertex,
double  tolerance 
)

Returns a list of all Edges connected to the input Vertex.

Parameters
vertexA Vertex
toleranceA positive tolerance value
Returns
The Edges connected to the input Vertex

◆ IsErdoesGallai()

bool Topologic::Graph::IsErdoesGallai ( List< int >^  sequence)

Returns True if the input sequence satisfies the Erdoes Gallai theorem. It returns False otherwise.

Parameters
sequenceThe input sequence
Returns
True if the input sequence satisfies the Erdoes Gallai theorem, otherwise false

◆ Path()

Wire Topologic::Graph::Path ( Vertex startVertex,
Vertex endVertex 
)

Returns the first Path found between the input Vertices.

Parameters
startVertexThe start Vertex
endVertexThe end Vertex
Returns
The path

◆ RemoveEdges()

Graph Topologic::Graph::RemoveEdges ( List< Edge^>^  edges)

Removes the input Edges from the Graph.

Parameters
edgesThe Edges to be removed
Returns
The Graph after the Edges are removed

◆ RemoveVertices()

Graph Topologic::Graph::RemoveVertices ( List< Vertex^>^  vertices)

Removes the input Vertices from the Graph.

Parameters
verticesThe Vertices to be removed
Returns
The Graph after the Vertices are removed

◆ ShortestPath()

Wire Topologic::Graph::ShortestPath ( Vertex startVertex,
Vertex endVertex,
String^  vertexKey,
String^  edgeKey 
)

Returns the path with the fewest number of Edges between the two input Vertices.

Parameters
startVertexThe start Vertex
endVertexThe end Vertex
vertexKeyThe key for the Vertex cost
edgeKeyThe key for the Edge cost
Returns
The shortest path

◆ ShortestPaths()

List< Wire^> Topologic::Graph::ShortestPaths ( Vertex startVertex,
Vertex endVertex,
String^  vertexKey,
String^  edgeKey,
Nullable< int >  timeLimitInSeconds 
)

Returns all paths with the fewest number of Edges between the two input Vertices.

Parameters
startVertexThe start Vertex
endVertexThe end Vertex
vertexKeyThe key for the Vertex cost
edgeKeyThe key for the Edge cost
Returns
The shortest paths

◆ TopologicalDistance()

int Topologic::Graph::TopologicalDistance ( Vertex startVertex,
Vertex endVertex 
)

Returns the number of Edges of the shortest path connecting the two input Vertices.

Parameters
startVertexThe start Vertex
endVertexThe end Vertex
Returns
The resulting topological distance

◆ VertexDegree()

int Topologic::Graph::VertexDegree ( Vertex vertex)

Returns the number of Edges connected to the input Vertex.

Parameters
vertexThe input Vertex
Returns
The degree of a Vertex

◆ VerticesAtCoordinates()

List< Vertex^> Topologic::Graph::VerticesAtCoordinates ( double  x,
double  y,
double  z,
double  tolerance 
)

Returns a list of Vertices in the Graph located at the input coordinates within the input tolerance distance.

Parameters
xThe X coordinate
yThe Y coordinate
zThe Z coordinate
toleranceA positive tolerance value
Returns
A list of the Vertices at the given coordinates

Property Documentation

◆ DegreeSequence

List< int>^ Topologic::Graph::DegreeSequence
get

Returns a list of Vertex degrees in a non-increasing order.

Returns
A list of Vertex degrees in a non-increasing order

◆ Density

double Topologic::Graph::Density
get

Returns the ratio of the number of Edges to the total number of Edges the Graph could have.

Returns
The Graph's density

◆ Diameter

int Topologic::Graph::Diameter
get

Returns the number of Edges of the shortest path between the most distanced Vertices.

Returns
The diameter of the Graph

◆ Edges

List< Edge^>^ Topologic::Graph::Edges
get

Returns a list of all the Edges in a Graph.

Returns
A list of the Edges in this Graph

◆ IsComplete

bool Topologic::Graph::IsComplete
get

Returns True if the Graph has a density of 1. Returns False otherwise.

Returns
True if the Graph has a density of 1, otherwise false

◆ IsolatedVertices

List< Vertex^>^ Topologic::Graph::IsolatedVertices
get

Returns a list of Vertices that are not connected by Edges.

Returns
A list of the isolated Vertices in this Graph

◆ MaximumDelta

int Topologic::Graph::MaximumDelta
get

Returns the maximum Vertex degree in a Graph.

Returns
The maximum Vertex degree in a Graph

◆ MinimumDelta

int Topologic::Graph::MinimumDelta
get

Returns the minimum Vertex degree in a Graph.

Returns
The minimum Vertex degree in a Graph

◆ Topology

Topology^ Topologic::Graph::Topology
get

Returns the Topology of the Graph.

Returns
The Topology of the Graph

◆ Vertices

List< Vertex^>^ Topologic::Graph::Vertices
get

Returns a list of all the Vertices in a Graph.

Returns
A list of Vertices in this Graph

The documentation for this class was generated from the following files: