org.grinvin.invariants
Interface InvariantComputer
- AbstractInvariantCComputer, AbstractInvariantComputer
public interface InvariantComputer
Implemented by all invariant computers. Every invariant computer
provides a means of computing the value of one specific invariant for
any graph we care to hand it.
Invariant computers are uniquely idenitified by a string identifier and
a version string.
InvariantValue | compute(GraphBundleView bundle) - Compute the value of the associated invariant for the given graph.
|
String | getId() - Return the universally unique identifier for this object.
|
String | getInvariantId() - Returns the identifier for the invariant computed by this
object.
|
String | getVersion() - Return the version of this computer.
|
compute
public InvariantValue compute(GraphBundleView bundle)
throws Exception
Compute the value of the associated invariant for the given graph.
Multiple parallel calls of this method for different graphs might occur
and must not return incorrect results.
bundle
- represents the graph for which the invariant
must be computed.
- the value of the invariant encapsulated in an invariant value of the correct type, i.e., the type
associated with the invariant.
getId
public String getId()
Return the universally unique identifier for this object.
For most invariant computers this is the fully qualified class name
of the implementation class.
- the unique string that identifies this InvariantComputer
getInvariantId
public String getInvariantId()
Returns the identifier for the invariant computed by this
object.
getVersion
public String getVersion()
Return the version of this computer.
- the version of this InvariantComputer