Class AdjacencyMatrix
Provides a list of nodes and edges connecting those nodes to form a graph of a set of IVersionable items.
Inheritance
Namespace: Algenta.Colectica.Model.Repository
Assembly: Algenta.Colectica.Model.dll
Syntax
public class AdjacencyMatrix : object
Properties
Edges
Gets the edges of the graph.
Declaration
public Collection<Relationship> Edges { get; }
Property Value
Type | Description |
---|---|
Collection<Relationship> |
Predicate
Gets or sets the relationship predicate to be followed to form the set. See RelationshipPredicates.
Declaration
public Guid Predicate { get; set; }
Property Value
Type | Description |
---|---|
Guid |
ReverseTraversal
Gets or sets a value indicating whether the set is defined as all items under the target item, or all items that contain the target item in their set.
Declaration
public bool ReverseTraversal { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Roots
Gets the identifiers of the root items that define the set.
Declaration
public Collection<IdentifierTriple> Roots { get; }
Property Value
Type | Description |
---|---|
Collection<IdentifierTriple> |
Methods
GetAllItemsSet()
Gets all the items in the set.
Declaration
public HashSet<IdentifierTriple> GetAllItemsSet()
Returns
Type | Description |
---|---|
HashSet<IdentifierTriple> |
GetParents(IdentifierTriple)
Gets the parents of the specified item.
Declaration
public HashSet<IdentifierTriple> GetParents(IdentifierTriple id)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | id | The item for which parents will be returned. |
Returns
Type | Description |
---|---|
HashSet<IdentifierTriple> | The parents of the specified item. |
GetReverseSet(IdentifierTriple)
Gets the reverse set, which is defined as the set of all items containing the specified root.
Declaration
public HashSet<IdentifierTriple> GetReverseSet(IdentifierTriple root)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | root | The (reverse) root of the set. |
Returns
Type | Description |
---|---|
HashSet<IdentifierTriple> | A HashSet of all items in the set. |
GetSet(IdentifierTriple)
Gets a HashSet of all items in the set defined by the specified root.
Declaration
public HashSet<IdentifierTriple> GetSet(IdentifierTriple root)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | root | The root of the set. |
Returns
Type | Description |
---|---|
HashSet<IdentifierTriple> | A HashSet of all items in the set. |
GetSet(IdentifierTriple, HashSet<IdentifierTriple>)
Gets all the nodes in a truncated set.
Declaration
public HashSet<IdentifierTriple> GetSet(IdentifierTriple root, HashSet<IdentifierTriple> treatAsLeafs)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | root | The root of the set. |
HashSet<IdentifierTriple> | treatAsLeafs | The items that should be treated as leaves. |
Returns
Type | Description |
---|---|
HashSet<IdentifierTriple> | The truncated set. |
GetSetList(IdentifierTriple)
Gets a list of all items in the set defined by the specified root.
Declaration
public Collection<IdentifierTriple> GetSetList(IdentifierTriple root)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | root | The root of the set. |
Returns
Type | Description |
---|---|
Collection<IdentifierTriple> | A list of all items in the set. |