cc.redberry.core.graph
Class PrimitiveSubgraph
- java.lang.Object
-
- cc.redberry.core.graph.PrimitiveSubgraph
-
public final class PrimitiveSubgraph extends java.lang.ObjectSub-graph of graph. This class is simply holdsGraphTypeof sub-graph and indices of its elements in the whole graph.- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor and Description PrimitiveSubgraph(GraphType graphType, int[] partition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GraphTypegetGraphType()Returns sub-graph typeint[]getPartition()Returns positions of sub-graph elements in the whole graph.intgetPosition(int i)Returns actual position of i-th tensor in sub-graph.intsize()Returns size of subgrph.java.lang.StringtoString()
-
-
-
Constructor Detail
-
PrimitiveSubgraph
public PrimitiveSubgraph(GraphType graphType, int[] partition)
- Parameters:
graphType- type of sub-graphpartition- positions of sub-graph elements in the whole graph
-
-
Method Detail
-
getGraphType
public GraphType getGraphType()
Returns sub-graph type- Returns:
- sub-graph type
-
getPartition
public int[] getPartition()
Returns positions of sub-graph elements in the whole graph.- Returns:
- positions of sub-graph elements in the whole graph
-
getPosition
public int getPosition(int i)
Returns actual position of i-th tensor in sub-graph.- Parameters:
i- position in tensor- Returns:
- position in graph
-
size
public int size()
Returns size of subgrph.- Returns:
- size of subgrph
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG