Quick links: Examples - Files.
Classes: Hierarchy - Index - List - Members.
Packages: Index - base - jni.

Public Member Functions | List of all members
cogitant.jni.Environment Class Reference

Environment. More...

+ Inheritance diagram for cogitant.jni.Environment:

Public Member Functions

 Environment ()
 
void finalize ()
 
int hashCode ()
 
cogitant.base.Support support ()
 Support. More...
 
void loadSupport (java.io.InputStream in, cogitant.base.IOHandler.Format format) throws ExceptionIO
 
void loadSupport (String f) throws ExceptionIO
 Load a support from a file. More...
 
Collection< cogitant.base.EnvironmentObjectloadObjects (java.io.InputStream in, cogitant.base.IOHandler.Format format) throws ExceptionIO
 
Collection< cogitant.base.EnvironmentObjectloadObjects (String f) throws ExceptionIO
 Load graphs/rules/constraints from a file. More...
 
String saveSupportString (cogitant.base.IOHandler.Format format) throws ExceptionIO
 
String saveObjectsString (Collection< cogitant.base.EnvironmentObject > obj, cogitant.base.IOHandler.Format format) throws ExceptionIO
 
String saveObjectString (cogitant.base.EnvironmentObject obj, cogitant.base.IOHandler.Format format) throws ExceptionIO
 
void setIOConfig (IOHandler.ConfigPropertyBool prop, boolean val)
 Change I/O configuration. More...
 
void deleteObject (cogitant.base.EnvironmentObject g) throws cogitant.base.Exception
 
Collection< cogitant.base.EnvironmentObjectobjects ()
 Set of objects (graphs/rules/constraints). More...
 
cogitant.base.EnvironmentObject findObject (String name)
 Find an object by its name. More...
 
cogitant.base.Graph newGraph ()
 Create a new empty graph. More...
 
cogitant.base.Graph newGraph (cogitant.base.Graph g)
 
void deleteGraph (cogitant.base.Graph g) throws cogitant.base.Exception
 
Collection< cogitant.base.Graphgraphs ()
 Set of graphs. More...
 
cogitant.base.Graph findGraph (String name)
 Find a graph by its name. More...
 
cogitant.base.Graph newGraphSubgraph (cogitant.base.Graph g, cogitant.base.GraphSubset gs) throws cogitant.base.Exception
 
void deleteRule (cogitant.base.Rule g) throws cogitant.base.Exception
 
Collection< cogitant.base.Rulerules ()
 Set of rules. More...
 
cogitant.base.Rule findRule (String name)
 Find a rule by its name. More...
 
void deleteConstraint (cogitant.base.Constraint g) throws cogitant.base.Exception
 
Collection< cogitant.base.Constraintconstraints ()
 Set of constraints. More...
 
cogitant.base.Constraint findConstraint (String name)
 Find a constraint by its name. More...
 
cogitant.base.ProjectionConfig projectionConfig ()
 Projection config. More...
 
cogitant.base.Projection newProjection (cogitant.base.Graph g, cogitant.base.Graph h) throws cogitant.base.Exception
 
boolean projectionHas (cogitant.base.Graph g, cogitant.base.Graph h) throws cogitant.base.Exception
 
int projectionNum (cogitant.base.Graph g, cogitant.base.Graph h) throws cogitant.base.Exception
 
Collection< cogitant.base.ProjectionprojectionFind (cogitant.base.Graph g, cogitant.base.Graph h) throws cogitant.base.Exception
 
void projectionStop ()
 Stop a projection operation. More...
 
java.util.Iterator< cogitant.base.ProjectionprojectionIterator (cogitant.base.Graph g, cogitant.base.Graph h, cogitant.base.ProjectionConfig pc) throws cogitant.base.Exception
 
void graphDisjointSum (cogitant.base.Graph g, cogitant.base.Graph h) throws cogitant.base.Exception
 
int graphNormalize (cogitant.base.Graph g) throws cogitant.base.Exception
 
void graphIrredundant (cogitant.base.Graph g) throws cogitant.base.Exception
 
void graphExternalJoin (cogitant.base.Graph g1, cogitant.base.GraphObject cg1, cogitant.base.Graph g2, cogitant.base.GraphObject cg2) throws cogitant.base.Exception
 
boolean graphVerifyIrredundant (cogitant.base.Graph g) throws cogitant.base.Exception
 
boolean graphVerifyEdges (cogitant.base.Graph g) throws cogitant.base.Exception
 
void graphEnsureWellFormed (cogitant.base.Graph g) throws cogitant.base.Exception
 
void graphExternalJoin (cogitant.base.Graph g1, cogitant.base.Graph g2, cogitant.base.GraphSubset subsetg2, Collection< cogitant.base.GraphObject > nodesg1, Collection< cogitant.base.GraphObject > nodesg2) throws cogitant.base.Exception
 
Collection< cogitant.base.ProjectionruleApplications (cogitant.base.Graph g, cogitant.base.Rule r, boolean newkonly) throws cogitant.base.Exception
 
boolean ruleApply (cogitant.base.Graph g, cogitant.base.Rule r, cogitant.base.Projection p, boolean newkonly) throws cogitant.base.Exception
 
int rulesClosure (cogitant.base.Graph g, Collection< cogitant.base.Rule > r, int maxapp, int maxpasses) throws cogitant.base.Exception
 
int rulesClosureNormalize (cogitant.base.Graph g, Collection< cogitant.base.Rule > r, int maxapp, int maxpasses) throws cogitant.base.Exception
 
boolean constraintSatisfaction (cogitant.base.Graph g, cogitant.base.Constraint c) throws cogitant.base.Exception
 
cogitant.base.CoupleOfProjections constraintSatisfactionViolation (cogitant.base.Graph g, cogitant.base.Constraint c) throws cogitant.base.Exception
 
void individualGraphsClosure (cogitant.base.Graph g, Collection< cogitant.base.Graph > indg) throws cogitant.base.Exception
 
- Public Member Functions inherited from cogitant.base.Environment
void loadSupport (java.io.InputStream in, IOHandler.Format format) throws ExceptionIO
 Load a support. More...
 
Collection< EnvironmentObjectloadObjects (java.io.InputStream in, IOHandler.Format format) throws ExceptionIO
 Load graphs/rules/constraints from an input stream. More...
 
String saveSupportString (IOHandler.Format format) throws ExceptionIO
 Save the support into a string. More...
 
String saveObjectsString (Collection< EnvironmentObject > obj, IOHandler.Format format) throws ExceptionIO
 Save objects into a string. More...
 
String saveObjectString (EnvironmentObject obj, IOHandler.Format format) throws ExceptionIO
 Save object into a string. More...
 
void deleteObject (EnvironmentObject g) throws cogitant.base.Exception
 Delete an object. More...
 
Graph newGraph (Graph g)
 Create a new graph as a copy of a graph. More...
 
void deleteGraph (Graph g) throws cogitant.base.Exception
 Delete a graph. More...
 
Graph newGraphSubgraph (Graph g, GraphSubset gs) throws cogitant.base.Exception
 Create a new graph as a subset of a Graph. More...
 
void deleteRule (Rule g) throws cogitant.base.Exception
 Delete a rule. More...
 
void deleteConstraint (Constraint g) throws cogitant.base.Exception
 Delete a constraint. More...
 
Projection newProjection (Graph g, Graph h) throws cogitant.base.Exception
 Creates a new (empty) projection. More...
 
boolean projectionHas (Graph g, Graph h) throws cogitant.base.Exception
 Projection (existence). More...
 
int projectionNum (Graph g, Graph h) throws cogitant.base.Exception
 Projection (number). More...
 
Collection< ProjectionprojectionFind (Graph g, Graph h) throws cogitant.base.Exception
 Projection (projections). More...
 
java.util.Iterator< ProjectionprojectionIterator (Graph g, Graph h, ProjectionConfig pc) throws cogitant.base.Exception
 Creates a new Iterator<Projection> for the projections from g to h. More...
 
void graphDisjointSum (Graph g, Graph h) throws cogitant.base.Exception
 Disjoint sum. More...
 
int graphNormalize (Graph g) throws cogitant.base.Exception
 Normalize a graph. More...
 
void graphIrredundant (Graph g) throws cogitant.base.Exception
 Computes the irredundant form of a graph. More...
 
void graphExternalJoin (Graph g1, GraphObject cg1, Graph g2, GraphObject cg2) throws cogitant.base.Exception
 External join. More...
 
void graphExternalJoin (Graph g1, Graph g2, GraphSubset subsetg2, Collection< GraphObject > nodesg1, Collection< GraphObject > nodesg2) throws cogitant.base.Exception
 External joins. More...
 
boolean graphVerifyIrredundant (Graph g) throws cogitant.base.Exception
 Irredundant graph. More...
 
boolean graphVerifyEdges (Graph g) throws cogitant.base.Exception
 Well-formed graph. More...
 
void graphEnsureWellFormed (Graph g) throws cogitant.base.Exception
 Verifies if a graph is well-formed. More...
 
Collection< ProjectionruleApplications (Graph g, Rule r, boolean newkonly) throws cogitant.base.Exception
 Projections from the hypothesis of the rule on the graph. More...
 
boolean ruleApply (Graph g, Rule r, Projection p, boolean newkonly) throws cogitant.base.Exception
 Apply a rule on a graph given a projection of the hypothesis. More...
 
int rulesClosure (Graph g, Collection< Rule > r, int maxapp, int maxpasses) throws cogitant.base.Exception
 Closure of a graph. More...
 
int rulesClosureNormalize (Graph g, Collection< Rule > r, int maxapp, int maxpasses) throws cogitant.base.Exception
 Closure of a graph + Normalize. More...
 
boolean constraintSatisfaction (Graph g, Constraint c) throws cogitant.base.Exception
 Satisfaction of a constraint by a graph. More...
 
CoupleOfProjections constraintSatisfactionViolation (Graph g, Constraint c) throws cogitant.base.Exception
 Satisfaction of a constraint by a graph. More...
 
void individualGraphsClosure (Graph g, Collection< Graph > indg) throws cogitant.base.Exception
 Closure of a graph by a set of individual graphs. More...
 

Additional Inherited Members

- Protected Attributes inherited from cogitant.jni.JniObject
long m_handlecpp =0
 

Detailed Description

Environment.

JNI implementation.

Constructor & Destructor Documentation

◆ Environment()

cogitant.jni.Environment.Environment ( )

Member Function Documentation

◆ constraints()

Collection<cogitant.base.Constraint> cogitant.jni.Environment.constraints ( )

Set of constraints.

Implements cogitant.base.Environment.

◆ constraintSatisfaction()

boolean cogitant.jni.Environment.constraintSatisfaction ( cogitant.base.Graph  g,
cogitant.base.Constraint  c 
) throws cogitant.base.Exception

◆ constraintSatisfactionViolation()

cogitant.base.CoupleOfProjections cogitant.jni.Environment.constraintSatisfactionViolation ( cogitant.base.Graph  g,
cogitant.base.Constraint  c 
) throws cogitant.base.Exception

◆ deleteConstraint()

void cogitant.jni.Environment.deleteConstraint ( cogitant.base.Constraint  g) throws cogitant.base.Exception

◆ deleteGraph()

void cogitant.jni.Environment.deleteGraph ( cogitant.base.Graph  g) throws cogitant.base.Exception

◆ deleteObject()

void cogitant.jni.Environment.deleteObject ( cogitant.base.EnvironmentObject  g) throws cogitant.base.Exception

◆ deleteRule()

void cogitant.jni.Environment.deleteRule ( cogitant.base.Rule  g) throws cogitant.base.Exception

◆ finalize()

void cogitant.jni.Environment.finalize ( )

◆ findConstraint()

cogitant.base.Constraint cogitant.jni.Environment.findConstraint ( String  name)

Find a constraint by its name.

Parameters
namesearched name.
Returns
constraint having this name or null.
See also
findObject().

Implements cogitant.base.Environment.

References cogitant.base.EnvironmentObject.Type.CONSTRAINT, and cogitant.jni.Environment.findObject().

◆ findGraph()

cogitant.base.Graph cogitant.jni.Environment.findGraph ( String  name)

Find a graph by its name.

Parameters
namesearched name.
Returns
graph having this name or null.
See also
findObject().

Implements cogitant.base.Environment.

References cogitant.jni.Environment.findObject(), and cogitant.base.EnvironmentObject.Type.GRAPH.

◆ findObject()

cogitant.base.EnvironmentObject cogitant.jni.Environment.findObject ( String  name)

Find an object by its name.

Parameters
namesearched name.
Returns
object having this name or null.
See also
EnvironmentObject.name().

Implements cogitant.base.Environment.

Referenced by cogitant.jni.Environment.findConstraint(), cogitant.jni.Environment.findGraph(), and cogitant.jni.Environment.findRule().

◆ findRule()

cogitant.base.Rule cogitant.jni.Environment.findRule ( String  name)

Find a rule by its name.

Parameters
namesearched name.
Returns
rule having this name or null.
See also
findObject().

Implements cogitant.base.Environment.

References cogitant.jni.Environment.findObject(), and cogitant.base.EnvironmentObject.Type.RULE.

◆ graphDisjointSum()

void cogitant.jni.Environment.graphDisjointSum ( cogitant.base.Graph  g,
cogitant.base.Graph  h 
) throws cogitant.base.Exception

◆ graphEnsureWellFormed()

void cogitant.jni.Environment.graphEnsureWellFormed ( cogitant.base.Graph  g) throws cogitant.base.Exception

◆ graphExternalJoin() [1/2]

void cogitant.jni.Environment.graphExternalJoin ( cogitant.base.Graph  g1,
cogitant.base.GraphObject  cg1,
cogitant.base.Graph  g2,
cogitant.base.GraphObject  cg2 
) throws cogitant.base.Exception

◆ graphExternalJoin() [2/2]

void cogitant.jni.Environment.graphExternalJoin ( cogitant.base.Graph  g1,
cogitant.base.Graph  g2,
cogitant.base.GraphSubset  subsetg2,
Collection< cogitant.base.GraphObject nodesg1,
Collection< cogitant.base.GraphObject nodesg2 
) throws cogitant.base.Exception

◆ graphIrredundant()

void cogitant.jni.Environment.graphIrredundant ( cogitant.base.Graph  g) throws cogitant.base.Exception

◆ graphNormalize()

int cogitant.jni.Environment.graphNormalize ( cogitant.base.Graph  g) throws cogitant.base.Exception

◆ graphs()

Collection<cogitant.base.Graph> cogitant.jni.Environment.graphs ( )

Set of graphs.

Implements cogitant.base.Environment.

◆ graphVerifyEdges()

boolean cogitant.jni.Environment.graphVerifyEdges ( cogitant.base.Graph  g) throws cogitant.base.Exception

◆ graphVerifyIrredundant()

boolean cogitant.jni.Environment.graphVerifyIrredundant ( cogitant.base.Graph  g) throws cogitant.base.Exception

◆ hashCode()

int cogitant.jni.Environment.hashCode ( )

◆ individualGraphsClosure()

void cogitant.jni.Environment.individualGraphsClosure ( cogitant.base.Graph  g,
Collection< cogitant.base.Graph indg 
) throws cogitant.base.Exception

◆ loadObjects() [1/2]

Collection<cogitant.base.EnvironmentObject> cogitant.jni.Environment.loadObjects ( java.io.InputStream  in,
cogitant.base.IOHandler.Format  format 
) throws ExceptionIO

◆ loadObjects() [2/2]

Collection<cogitant.base.EnvironmentObject> cogitant.jni.Environment.loadObjects ( String  f) throws ExceptionIO

Load graphs/rules/constraints from a file.

Parameters
ffilename.

Implements cogitant.base.Environment.

◆ loadSupport() [1/2]

void cogitant.jni.Environment.loadSupport ( java.io.InputStream  in,
cogitant.base.IOHandler.Format  format 
) throws ExceptionIO

◆ loadSupport() [2/2]

void cogitant.jni.Environment.loadSupport ( String  f) throws ExceptionIO

Load a support from a file.

This method replaces the current support.

Parameters
ffilename.

Implements cogitant.base.Environment.

◆ newGraph() [1/2]

cogitant.base.Graph cogitant.jni.Environment.newGraph ( )

Create a new empty graph.

Implements cogitant.base.Environment.

Referenced by cogitant.jni.Environment.newGraphSubgraph().

◆ newGraph() [2/2]

cogitant.base.Graph cogitant.jni.Environment.newGraph ( cogitant.base.Graph  g)

◆ newGraphSubgraph()

cogitant.base.Graph cogitant.jni.Environment.newGraphSubgraph ( cogitant.base.Graph  g,
cogitant.base.GraphSubset  gs 
) throws cogitant.base.Exception

◆ newProjection()

cogitant.base.Projection cogitant.jni.Environment.newProjection ( cogitant.base.Graph  g,
cogitant.base.Graph  h 
) throws cogitant.base.Exception

◆ objects()

Collection<cogitant.base.EnvironmentObject> cogitant.jni.Environment.objects ( )

Set of objects (graphs/rules/constraints).

Implements cogitant.base.Environment.

◆ projectionConfig()

cogitant.base.ProjectionConfig cogitant.jni.Environment.projectionConfig ( )

Projection config.

Implements cogitant.base.Environment.

◆ projectionFind()

Collection<cogitant.base.Projection> cogitant.jni.Environment.projectionFind ( cogitant.base.Graph  g,
cogitant.base.Graph  h 
) throws cogitant.base.Exception

◆ projectionHas()

boolean cogitant.jni.Environment.projectionHas ( cogitant.base.Graph  g,
cogitant.base.Graph  h 
) throws cogitant.base.Exception

◆ projectionIterator()

java.util.Iterator<cogitant.base.Projection> cogitant.jni.Environment.projectionIterator ( cogitant.base.Graph  g,
cogitant.base.Graph  h,
cogitant.base.ProjectionConfig  pc 
) throws cogitant.base.Exception

◆ projectionNum()

int cogitant.jni.Environment.projectionNum ( cogitant.base.Graph  g,
cogitant.base.Graph  h 
) throws cogitant.base.Exception

◆ projectionStop()

void cogitant.jni.Environment.projectionStop ( )

Stop a projection operation.

When called from another thread, this method ask the projection operation (called by projectionHas(), projectionNum() or projectionFind()) to stop as soon as possible.

Implements cogitant.base.Environment.

◆ ruleApplications()

Collection<cogitant.base.Projection> cogitant.jni.Environment.ruleApplications ( cogitant.base.Graph  g,
cogitant.base.Rule  r,
boolean  newkonly 
) throws cogitant.base.Exception

◆ ruleApply()

boolean cogitant.jni.Environment.ruleApply ( cogitant.base.Graph  g,
cogitant.base.Rule  r,
cogitant.base.Projection  p,
boolean  newkonly 
) throws cogitant.base.Exception

◆ rules()

Collection<cogitant.base.Rule> cogitant.jni.Environment.rules ( )

Set of rules.

Implements cogitant.base.Environment.

◆ rulesClosure()

int cogitant.jni.Environment.rulesClosure ( cogitant.base.Graph  g,
Collection< cogitant.base.Rule r,
int  maxapp,
int  maxpasses 
) throws cogitant.base.Exception

◆ rulesClosureNormalize()

int cogitant.jni.Environment.rulesClosureNormalize ( cogitant.base.Graph  g,
Collection< cogitant.base.Rule r,
int  maxapp,
int  maxpasses 
) throws cogitant.base.Exception

◆ saveObjectsString()

String cogitant.jni.Environment.saveObjectsString ( Collection< cogitant.base.EnvironmentObject obj,
cogitant.base.IOHandler.Format  format 
) throws ExceptionIO

◆ saveObjectString()

String cogitant.jni.Environment.saveObjectString ( cogitant.base.EnvironmentObject  obj,
cogitant.base.IOHandler.Format  format 
) throws ExceptionIO

◆ saveSupportString()

String cogitant.jni.Environment.saveSupportString ( cogitant.base.IOHandler.Format  format) throws ExceptionIO

◆ setIOConfig()

void cogitant.jni.Environment.setIOConfig ( IOHandler.ConfigPropertyBool  prop,
boolean  val 
)

Change I/O configuration.

Parameters
propproperty.
valvalue.

Implements cogitant.base.Environment.

Examples:
JavaExternalJoin.java, JavaExternalJoins.java, and JavaProjection.java.

◆ support()

cogitant.base.Support cogitant.jni.Environment.support ( )

Support.

Implements cogitant.base.Environment.