C# Класс VelocityGraph.VertexType

Наследование: OptimizedPersistable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddToResult void
NewHeadToTailEdge void
NewTailToHeadEdge void
RemoveHeadToTailEdge void
RemoveTailToHeadEdge void
Traverse HashSet>.Dictionary
Traverse HashSet>.Dictionary
VertexType System

Открытые методы

Метод Описание
CountVertices ( ) : long

Count of vertcies

FindProperty ( string name ) : PropertyType

Gets the associated PropertyType given a propert type name or null if such property type does't exist.

GetEdges ( EdgeType etype, Direction dir ) : IEnumerable

Enumerates edges connected wih this vertex type

GetEdges ( EdgeType edgeType, Vertex vertex1, Direction dir, Vertex vertex2 = null ) : IEnumerable

Get all edges found between two vertices

GetEdges ( Vertex vertex1, Direction dir ) : IEnumerable

Get all edges found from a given Vertex

GetNumberOfEdges ( EdgeType etype, Direction dir ) : long

Get the number of edges of a certain type that can be found and an edge direction

GetNumberOfEdges ( EdgeType etype, Int32 vertexId, Direction dir ) : long

Get the number of edges of a certain type that can be found associated with a vertex id and an edge direction

GetNumberOfEdges ( EdgeType edgeType, Int32 vertexId, Int32 vertexId2, Direction dir ) : long

Get the number of edges of a certain type that can be found associated with a vertex id, another vertex id at other end and an edge direction

GetPropertyKeys ( ) : IEnumerable

Return all the keys associated with the vertex type.

GetPropertyTypes ( ) : IEnumerable

Return all the property types associated with vertex type.

GetPropertyValue ( Int32 vertexId, PropertyType propertyType ) : object

Get the property value for a Vertex

GetTopNumberOfEdges ( EdgeType etype, int howMany, Direction dir ) : Vertex[]

Get the top vertices with the most number of edges of the given edge type

GetVertex ( Int32 vertexId, bool polymorphic = false, bool errorIfNotFound = true ) : Vertex

Instantiates a Vertex if it exist

GetVerticeIds ( ) : IEnumerable

Get existing Vertex ids for this type

GetVertices ( EdgeType etype, Vertex vertex1, Direction dir ) : IEnumerable

Get an enumeration of existing vertices of this type found by following an edge type

GetVertices ( bool polymorphic = false ) : IEnumerable

Enumerates all vertices for the given type

NewProperty ( string name, DataType dt, PropertyKind kind ) : PropertyType

Creates a new Property.

NewVertex ( Int32 vId ) : Vertex

Creates a new Vertex

Remove ( ) : void

Removes this VertexType from a graph. An exception is thrown if the VertexType is in use.

RemoveVertex ( Vertex vertex ) : void

Removes a vertex from this type and graph

SetPropertyValue ( Int32 vertexId, PropertyType propertyType, IComparable v ) : void

Sets a property value

ToString ( ) : string
Unpersist ( SessionBase session ) : void

Защищенные методы

Метод Описание
edgeVertexId ( System.Edge edge, Int32 vertexId ) : System.UInt64

Gets a combined Edge id and Vertex id

Приватные методы

Метод Описание
AddToResult ( Dictionary result, Vertex key, System.Edge value ) : void
NewHeadToTailEdge ( EdgeType edgeType, System.Edge edge, Vertex tail, Vertex head, SessionBase session ) : void
NewTailToHeadEdge ( EdgeType edgeType, System.Edge edge, Vertex tail, Vertex head, SessionBase session ) : void
RemoveHeadToTailEdge ( System.Edge edge ) : void
RemoveTailToHeadEdge ( System.Edge edge ) : void
Traverse ( Vertex vertex1, Direction dir, ISet edgeTypesToTraverse = null ) : HashSet>.Dictionary
Traverse ( Vertex vertex1, EdgeType etype, Direction dir ) : HashSet>.Dictionary

Selects all neighbor Vertices from or to this vertex and for the given edge type.

VertexType ( Int32 aTypeId, string aTypeName, VertexType baseType, Graph graph ) : System

Описание методов

CountVertices() публичный Метод

Count of vertcies
public CountVertices ( ) : long
Результат long

FindProperty() публичный Метод

Gets the associated PropertyType given a propert type name or null if such property type does't exist.
public FindProperty ( string name ) : PropertyType
name string A property type name
Результат PropertyType

GetEdges() публичный Метод

Enumerates edges connected wih this vertex type
public GetEdges ( EdgeType etype, Direction dir ) : IEnumerable
etype EdgeType A type of edge type to look for
dir Direction Direction of edge
Результат IEnumerable

GetEdges() публичный Метод

Get all edges found between two vertices
public GetEdges ( EdgeType edgeType, Vertex vertex1, Direction dir, Vertex vertex2 = null ) : IEnumerable
edgeType EdgeType Restrict to this type of edge
vertex1 Vertex Start
dir Direction Follow edges in this direction
vertex2 Vertex End
Результат IEnumerable

GetEdges() публичный Метод

Get all edges found from a given Vertex
public GetEdges ( Vertex vertex1, Direction dir ) : IEnumerable
vertex1 Vertex A id
dir Direction follow edges in this direction
Результат IEnumerable

GetNumberOfEdges() публичный Метод

Get the number of edges of a certain type that can be found and an edge direction
public GetNumberOfEdges ( EdgeType etype, Direction dir ) : long
etype EdgeType Use this type of edge
dir Direction Edge direction to follow
Результат long

GetNumberOfEdges() публичный Метод

Get the number of edges of a certain type that can be found associated with a vertex id and an edge direction
public GetNumberOfEdges ( EdgeType etype, Int32 vertexId, Direction dir ) : long
etype EdgeType Type of edges to look for
vertexId System.Int32 Id of a
dir Direction Edge direction to use
Результат long

GetNumberOfEdges() публичный Метод

Get the number of edges of a certain type that can be found associated with a vertex id, another vertex id at other end and an edge direction
public GetNumberOfEdges ( EdgeType edgeType, Int32 vertexId, Int32 vertexId2, Direction dir ) : long
edgeType EdgeType
vertexId System.Int32 Id of a
vertexId2 System.Int32 Id of a
dir Direction Edge direction to use
Результат long

GetPropertyKeys() публичный Метод

Return all the keys associated with the vertex type.
public GetPropertyKeys ( ) : IEnumerable
Результат IEnumerable

GetPropertyTypes() публичный Метод

Return all the property types associated with vertex type.
public GetPropertyTypes ( ) : IEnumerable
Результат IEnumerable

GetPropertyValue() публичный Метод

Get the property value for a Vertex
public GetPropertyValue ( Int32 vertexId, PropertyType propertyType ) : object
vertexId System.Int32 Id of
propertyType PropertyType Type of property
Результат object

GetTopNumberOfEdges() публичный Метод

Get the top vertices with the most number of edges of the given edge type
public GetTopNumberOfEdges ( EdgeType etype, int howMany, Direction dir ) : Vertex[]
etype EdgeType The edge type to look for
howMany int How many top ones to collect
dir Direction What end of edges to look at
Результат Vertex[]

GetVertex() публичный Метод

Instantiates a Vertex if it exist
public GetVertex ( Int32 vertexId, bool polymorphic = false, bool errorIfNotFound = true ) : Vertex
vertexId System.Int32 id of Vertex we are looking for
polymorphic bool If true and id isn't found in this VertexType continue search into sub types
errorIfNotFound bool Indicate what to do if Vertex does not exist
Результат Vertex

GetVerticeIds() публичный Метод

Get existing Vertex ids for this type
public GetVerticeIds ( ) : IEnumerable
Результат IEnumerable

GetVertices() публичный Метод

Get an enumeration of existing vertices of this type found by following an edge type
public GetVertices ( EdgeType etype, Vertex vertex1, Direction dir ) : IEnumerable
etype EdgeType Edge type to follow
vertex1 Vertex Vertex to start from
dir Direction Edge direction to follow
Результат IEnumerable

GetVertices() публичный Метод

Enumerates all vertices for the given type
public GetVertices ( bool polymorphic = false ) : IEnumerable
polymorphic bool If true, also include all vertices of sub types of this VertexType
Результат IEnumerable

NewProperty() публичный Метод

Creates a new Property.
public NewProperty ( string name, DataType dt, PropertyKind kind ) : PropertyType
name string Unique name for the new Property.
dt DataType Data type for the new Property.
kind PropertyKind Property kind.
Результат PropertyType

NewVertex() публичный Метод

Creates a new Vertex
public NewVertex ( Int32 vId ) : Vertex
vId System.Int32 Optionally provide the Vertex id to use.
Результат Vertex

Remove() публичный Метод

Removes this VertexType from a graph. An exception is thrown if the VertexType is in use.
public Remove ( ) : void
Результат void

RemoveVertex() публичный Метод

Removes a vertex from this type and graph
public RemoveVertex ( Vertex vertex ) : void
vertex Vertex The vertex to remove
Результат void

SetPropertyValue() публичный Метод

Sets a property value
public SetPropertyValue ( Int32 vertexId, PropertyType propertyType, IComparable v ) : void
vertexId System.Int32 Id of for which to set property value
propertyType PropertyType The type of property to set
v IComparable the value to set the property to
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

Unpersist() публичный Метод

public Unpersist ( SessionBase session ) : void
session SessionBase
Результат void

edgeVertexId() защищенный Метод

Gets a combined Edge id and Vertex id
protected edgeVertexId ( System.Edge edge, Int32 vertexId ) : System.UInt64
edge System.Edge Get edge id from this edge
vertexId System.Int32 A id
Результат System.UInt64