Interface IsomorphismIMapping
- All Superinterfaces:
IsomorphismMapping<Integer,
Integer, Integer, Integer>
IntGraph
.
This is a specialization of IsomorphismMapping
for IntGraph
. See the generic interface for more
details.
- Author:
- Barak Ugav
-
Method Summary
Modifier and TypeMethodDescriptioninverse()
Get the inverse mapping.int
mapEdge
(int edge) Map an edge from the first graph to an edge of the second graph.default Integer
Deprecated.Get the set of the edges that are mapped out of all the edges of the source graph.Get the set of the vertices that are mapped out of all the vertices of the source graph.int
mapVertex
(int vertex) Map a vertex from the first graph to a vertex of the second graph.default Integer
Deprecated.Please usemapVertex(int)
instead to avoid un/boxing.Get the source graph.Get the target graph.
-
Method Details
-
mapVertex
int mapVertex(int vertex) Map a vertex from the first graph to a vertex of the second graph.- Parameters:
vertex
- the vertex to map- Returns:
- the mapped vertex, or
-1
ifv1
is not mapped - Throws:
NoSuchVertexException
- if the vertex does not exist in the first graph
-
mapVertex
Deprecated.Please usemapVertex(int)
instead to avoid un/boxing.Map a vertex from the first graph to a vertex of the second graph. -
mapEdge
int mapEdge(int edge) Map an edge from the first graph to an edge of the second graph.- Parameters:
edge
- the edge to map- Returns:
- the mapped edge, or
-1
ife1
is not mapped - Throws:
NoSuchEdgeException
- if the edge does not exist in the first graph
-
mapEdge
Deprecated.Please usemapEdge(int)
instead to avoid un/boxing.Map an edge from the first graph to an edge of the second graph. -
inverse
IsomorphismIMapping inverse()Description copied from interface:IsomorphismMapping
Get the inverse mapping. -
sourceGraph
IntGraph sourceGraph()Description copied from interface:IsomorphismMapping
Get the source graph.The 'source' graph contains the vertices and edges of the domain of the mapping, namely these vertices and edges are mapped to vertices and edges of the target (range) graph.
- Specified by:
sourceGraph
in interfaceIsomorphismMapping<Integer,
Integer, Integer, Integer> - Returns:
- the source graph
-
targetGraph
IntGraph targetGraph()Description copied from interface:IsomorphismMapping
Get the target graph.The 'target' graph contains the vertices and edges of the range of the mapping, namely the vertices and edges of another graph (the source or domain graph) are mapped to these vertices and edges.
- Specified by:
targetGraph
in interfaceIsomorphismMapping<Integer,
Integer, Integer, Integer> - Returns:
- the target graph
-
mappedVertices
IntSet mappedVertices()Description copied from interface:IsomorphismMapping
Get the set of the vertices that are mapped out of all the vertices of the source graph.The mapping may not map all the vertices of the source graph, in case the first graph is smaller than the second graph, and a (maybe induced) sub graph isomorphism was searched. This method can be used to get the set of vertices for which there is a corresponding vertex in the target graph.
Together with
IsomorphismMapping.mappedEdges()
, this method can be used to construct the subgraph mapped to the target graph:Set<V1> vertices = mapping.mappedVertices(); Set<E1> edges = mapping.mappedEdges(); Graph<V1, E1> mappedSubGraph = mapping.sourceGraph().subGraphCopy(vertices, edges);
- Specified by:
mappedVertices
in interfaceIsomorphismMapping<Integer,
Integer, Integer, Integer> - Returns:
- the set of the mapped vertices
-
mappedEdges
IntSet mappedEdges()Description copied from interface:IsomorphismMapping
Get the set of the edges that are mapped out of all the edges of the source graph.The mapping may not map all the edges of the source graph, in case the first graph is smaller than the second graph, and a (maybe induced) sub graph isomorphism was searched. This method can be used to get the set of edges for which there is a corresponding edge in the target graph.
Together with
IsomorphismMapping.mappedVertices()
, this method can be used to construct the subgraph mapped to the target graph:Set<V1> vertices = mapping.mappedVertices(); Set<E1> edges = mapping.mappedEdges(); Graph<V1, E1> mappedSubGraph = mapping.sourceGraph().subGraphCopy(vertices, edges);
- Specified by:
mappedEdges
in interfaceIsomorphismMapping<Integer,
Integer, Integer, Integer> - Returns:
- the set of the mapped edges
-
mapEdge(int)
instead to avoid un/boxing.