public class SComponentRepresentation extends Object
Constructor and Description |
---|
SComponentRepresentation(int[] sourceToNodename,
Set<SComponent> components,
GraphInfo completeGraphInfo)
Creates an s-component representation defined by the given source assignment sourceToNodename and the set of s-components.
|
SComponentRepresentation(SGraph completeGraph,
GraphAlgebra alg)
Creates a component representation of the complete (input) graph
without sources.
|
SComponentRepresentation(SGraph graph,
Map<SComponent,SComponent> storedComponents,
GraphInfo completeGraphInfo)
Creates an s-component representation of the s-graph
graph , with respect to the supergraph represented by completeGraphInfo . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Returns true iff the source assignments and the set of components are equal.
|
SComponentRepresentation |
forgetReverse(int source,
int vNr,
SComponent oldComponent,
SComponent replacingComponent)
Returns the unique s-component representation C such that forgetting source name
source in C yields this representation, and source is assigned to node vNr in C. |
SComponentRepresentation |
forgetReverse(int source,
int vNr,
SComponent oldComponent,
Set<SComponent> replacingComponents)
Returns the unique s-component representation C such that forgetting source name
source in C yields this representation, and source is assigned to node vNr in C. |
Set<SComponent> |
getComponents() |
int |
hashCode()
Based on the source assignment and the set of components are equal.
|
boolean |
isConnected()
Returns true iff the sub-s-graph corresponding to this s-component representation is connected.
|
String |
toString() |
void |
writeStats()
Writes statistics into componentWriter and averageLogger of SGraphParsingEvaluation.
|
public SComponentRepresentation(SGraph completeGraph, GraphAlgebra alg)
completeGraph
- alg
- public SComponentRepresentation(int[] sourceToNodename, Set<SComponent> components, GraphInfo completeGraphInfo)
sourceToNodename
- components
- completeGraphInfo
- public SComponentRepresentation(SGraph graph, Map<SComponent,SComponent> storedComponents, GraphInfo completeGraphInfo)
graph
, with respect to the supergraph represented by completeGraphInfo
.
Checks with storedComponents
whether any of the s-components in the new representation is already stored, in which case it uses the already stored object.graph
- storedComponents
- completeGraphInfo
- public Set<SComponent> getComponents()
public void writeStats()
public boolean isConnected()
public SComponentRepresentation forgetReverse(int source, int vNr, SComponent oldComponent, Set<SComponent> replacingComponents)
source
in C yields this representation, and source
is assigned to node vNr
in C.
This function is meant for the case where promoting vNr
to a source splits the s-component it is contained in, and , as well as
the components which replace after the promotion, are already known.source
- vNr
- oldComponent
- replacingComponents
- public SComponentRepresentation forgetReverse(int source, int vNr, SComponent oldComponent, SComponent replacingComponent)
source
in C yields this representation, and source
is assigned to node vNr
in C.
This function is meant for the case where promoting vNr
to a source does not split the s-component it is contained in, and , as well as
the component which replace after the promotion, are already known.source
- vNr
- oldComponent
- replacingComponent
- public boolean equals(Object other)
public int hashCode()
Copyright © 2017. All rights reserved.