Inheritance diagram for cogitant.base.Environment:Public Member Functions | |
| Support | support () |
| Support. More... | |
Input/output. | |
| void | loadSupport (java.io.InputStream in, IOHandler.Format format) throws ExceptionIO |
| Load a support. More... | |
| void | loadSupport (String f) throws ExceptionIO |
| Load a support from a file. More... | |
| Collection< EnvironmentObject > | loadObjects (java.io.InputStream in, IOHandler.Format format) throws ExceptionIO |
| Load graphs/rules/constraints from an input stream. More... | |
| Collection< EnvironmentObject > | loadObjects (String f) throws ExceptionIO |
| Load graphs/rules/constraints from a file. 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 | setIOConfig (IOHandler.ConfigPropertyBool prop, boolean val) |
| Change I/O configuration. More... | |
Objects. | |
| void | deleteObject (EnvironmentObject g) throws cogitant.base.Exception |
| Delete an object. More... | |
| Collection< EnvironmentObject > | objects () |
| Set of objects (graphs/rules/constraints). More... | |
| EnvironmentObject | findObject (String name) |
| Find an object by its name. More... | |
Graphs. | |
| Graph | newGraph () |
| Create a new empty graph. 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... | |
| Collection< Graph > | graphs () |
| Set of graphs. More... | |
| Graph | findGraph (String name) |
| Find a graph by its name. More... | |
| Graph | newGraphSubgraph (Graph g, GraphSubset gs) throws cogitant.base.Exception |
| Create a new graph as a subset of a Graph. More... | |
Rules. | |
| void | deleteRule (Rule g) throws cogitant.base.Exception |
| Delete a rule. More... | |
| Collection< Rule > | rules () |
| Set of rules. More... | |
| Rule | findRule (String name) |
| Find a rule by its name. More... | |
Constraints. | |
| void | deleteConstraint (Constraint g) throws cogitant.base.Exception |
| Delete a constraint. More... | |
| Collection< Constraint > | constraints () |
| Set of constraints. More... | |
| Constraint | findConstraint (String name) |
| Find a constraint by its name. More... | |
Projection operations. | |
| ProjectionConfig | projectionConfig () |
| Projection config. 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< Projection > | projectionFind (Graph g, Graph h) throws cogitant.base.Exception |
| Projection (projections). More... | |
| void | projectionStop () |
| Stop a projection operation. More... | |
| java.util.Iterator< Projection > | projectionIterator (Graph g, Graph h, ProjectionConfig pc) throws cogitant.base.Exception |
| Creates a new Iterator<Projection> for the projections from g to h. More... | |
Graph operations. | |
| 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... | |
Graph checkings. | |
| 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... | |
Rule operations. | |
| Collection< Projection > | ruleApplications (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... | |
Constraint operations. | |
| 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... | |
Individual graph operations. | |
| void | individualGraphsClosure (Graph g, Collection< Graph > indg) throws cogitant.base.Exception |
| Closure of a graph by a set of individual graphs. More... | |
| Collection<Constraint> cogitant.base.Environment.constraints | ( | ) |
Set of constraints.
Implemented in cogitant.jni.Environment.
| boolean cogitant.base.Environment.constraintSatisfaction | ( | Graph | g, |
| Constraint | c | ||
| ) | throws cogitant.base.Exception |
Satisfaction of a constraint by a graph.
| g | a graph of the Environment. |
| c | a constraint of the Environment. |
| CoupleOfProjections cogitant.base.Environment.constraintSatisfactionViolation | ( | Graph | g, |
| Constraint | c | ||
| ) | throws cogitant.base.Exception |
Satisfaction of a constraint by a graph.
| g | a graph of the Environment. |
| c | a constraint of the Environment. |
| void cogitant.base.Environment.deleteConstraint | ( | Constraint | g | ) | throws cogitant.base.Exception |
Delete a constraint.
| void cogitant.base.Environment.deleteGraph | ( | Graph | g | ) | throws cogitant.base.Exception |
Delete a graph.
| void cogitant.base.Environment.deleteObject | ( | EnvironmentObject | g | ) | throws cogitant.base.Exception |
Delete an object.
| void cogitant.base.Environment.deleteRule | ( | Rule | g | ) | throws cogitant.base.Exception |
Delete a rule.
| Constraint cogitant.base.Environment.findConstraint | ( | String | name | ) |
Find a constraint by its name.
| name | searched name. |
Implemented in cogitant.jni.Environment.
| Graph cogitant.base.Environment.findGraph | ( | String | name | ) |
Find a graph by its name.
| name | searched name. |
Implemented in cogitant.jni.Environment.
| EnvironmentObject cogitant.base.Environment.findObject | ( | String | name | ) |
Find an object by its name.
| name | searched name. |
Implemented in cogitant.jni.Environment.
| Rule cogitant.base.Environment.findRule | ( | String | name | ) |
Find a rule by its name.
| name | searched name. |
Implemented in cogitant.jni.Environment.
| void cogitant.base.Environment.graphDisjointSum | ( | Graph | g, |
| Graph | h | ||
| ) | throws cogitant.base.Exception |
Disjoint sum.
| g | a graph of the Environment. This graph is modified and contains the disjoint sum g + h when this method finishes. |
| h | a graph of the Environment. |
| void cogitant.base.Environment.graphEnsureWellFormed | ( | Graph | g | ) | throws cogitant.base.Exception |
Verifies if a graph is well-formed.
Throws an if the graph is not well-formed.
| g | a graph of the Environment. |
| void cogitant.base.Environment.graphExternalJoin | ( | Graph | g1, |
| GraphObject | cg1, | ||
| Graph | g2, | ||
| GraphObject | cg2 | ||
| ) | throws cogitant.base.Exception |
External join.
| g1 | graph of the Environment. This graph is modified. |
| cg1 | concept node of g1. |
| g2 | graph of the Environment. |
| cg2 | concept node of g2. |
| void cogitant.base.Environment.graphExternalJoin | ( | Graph | g1, |
| Graph | g2, | ||
| GraphSubset | subsetg2, | ||
| Collection< GraphObject > | nodesg1, | ||
| Collection< GraphObject > | nodesg2 | ||
| ) | throws cogitant.base.Exception |
External joins.
| g1 | graph of the Environment. This graph is modified. |
| g2 | graph of the Environment. |
| subsetg2 | subset of g2 that contains nodes of g2 to copy into g1. |
| nodesg1 | concept nodes of g1. |
| nodesg2 | concept nodes of g2 that are joined with nodes of g1. The i-th node of nodesg2 is joind with the i-th node of nodesg1. |
| void cogitant.base.Environment.graphIrredundant | ( | Graph | g | ) | throws cogitant.base.Exception |
Computes the irredundant form of a graph.
| g | graph of the Environment. This graph is modified. |
| int cogitant.base.Environment.graphNormalize | ( | Graph | g | ) | throws cogitant.base.Exception |
Normalize a graph.
| g | a graph of the Environment. This graph is modified. |
| Collection<Graph> cogitant.base.Environment.graphs | ( | ) |
Set of graphs.
Implemented in cogitant.jni.Environment.
| boolean cogitant.base.Environment.graphVerifyEdges | ( | Graph | g | ) | throws cogitant.base.Exception |
Well-formed graph.
| g | a graph of the Environment. |
| boolean cogitant.base.Environment.graphVerifyIrredundant | ( | Graph | g | ) | throws cogitant.base.Exception |
| void cogitant.base.Environment.individualGraphsClosure | ( | Graph | g, |
| Collection< Graph > | indg | ||
| ) | throws cogitant.base.Exception |
Closure of a graph by a set of individual graphs.
Note that individual graphs are used to expand concept nodes of the initial graph only. Added nodes are not expanded.
| g | a graph of the Environment. This graph is modified by the method and contains the closure of the initial graph with th set of individual graphs. |
| indg | set of individual graphs. |
| Collection<EnvironmentObject> cogitant.base.Environment.loadObjects | ( | java.io.InputStream | in, |
| IOHandler.Format | format | ||
| ) | throws ExceptionIO |
Load graphs/rules/constraints from an input stream.
| in | input stream. |
| format | input format. |
| Collection<EnvironmentObject> cogitant.base.Environment.loadObjects | ( | String | f | ) | throws ExceptionIO |
Load graphs/rules/constraints from a file.
| f | filename. |
Implemented in cogitant.jni.Environment.
| void cogitant.base.Environment.loadSupport | ( | java.io.InputStream | in, |
| IOHandler.Format | format | ||
| ) | throws ExceptionIO |
Load a support.
This method replaces the current support.
| in | input stream. |
| format | input format. |
| void cogitant.base.Environment.loadSupport | ( | String | f | ) | throws ExceptionIO |
Load a support from a file.
This method replaces the current support.
| f | filename. |
Implemented in cogitant.jni.Environment.
| Graph cogitant.base.Environment.newGraph | ( | ) |
Create a new empty graph.
Implemented in cogitant.jni.Environment.
| Graph cogitant.base.Environment.newGraphSubgraph | ( | Graph | g, |
| GraphSubset | gs | ||
| ) | throws cogitant.base.Exception |
Create a new graph as a subset of a Graph.
| Projection cogitant.base.Environment.newProjection | ( | Graph | g, |
| Graph | h | ||
| ) | throws cogitant.base.Exception |
Creates a new (empty) projection.
| Collection<EnvironmentObject> cogitant.base.Environment.objects | ( | ) |
Set of objects (graphs/rules/constraints).
Implemented in cogitant.jni.Environment.
| ProjectionConfig cogitant.base.Environment.projectionConfig | ( | ) |
Projection config.
Implemented in cogitant.jni.Environment.
| Collection<Projection> cogitant.base.Environment.projectionFind | ( | Graph | g, |
| Graph | h | ||
| ) | throws cogitant.base.Exception |
Projection (projections).
| g | a graph of the Environment. |
| h | a normal graph of the Environment. |
| boolean cogitant.base.Environment.projectionHas | ( | Graph | g, |
| Graph | h | ||
| ) | throws cogitant.base.Exception |
Projection (existence).
| g | a graph of the Environment. |
| h | a normal graph of the Environment. |
| java.util.Iterator<Projection> cogitant.base.Environment.projectionIterator | ( | Graph | g, |
| Graph | h, | ||
| ProjectionConfig | pc | ||
| ) | throws cogitant.base.Exception |
Creates a new Iterator<Projection> for the projections from g to h.
| g | a graph of the Environment. |
| h | a norma graph of the Environment. |
| pc | projection config. If null, uses the default ProjectionConfig from the Environment. |
| int cogitant.base.Environment.projectionNum | ( | Graph | g, |
| Graph | h | ||
| ) | throws cogitant.base.Exception |
Projection (number).
| g | a graph of the Environment. |
| h | a normal graph of the Environment. |
| void cogitant.base.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.
Implemented in cogitant.jni.Environment.
| Collection<Projection> cogitant.base.Environment.ruleApplications | ( | Graph | g, |
| Rule | r, | ||
| boolean | newkonly | ||
| ) | throws cogitant.base.Exception |
Projections from the hypothesis of the rule on the graph.
| g | a graph of the Environment. |
| r | a rule of the Environement. |
| newkonly | if true returns only projections that may produce new knowledge, if false returns each projection from thy hypothesis of r to g. |
| boolean cogitant.base.Environment.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.
| g | a graph of the Environment. This graph is modified by the method. |
| r | a rule of the Environement. |
| p | a projection of the hypothesis of r on g. |
| newkonly | if true apply r only if this application adds new knowledge to g. If false, always apply the rule. |
true iff the rule has been applied. | Collection<Rule> cogitant.base.Environment.rules | ( | ) |
Set of rules.
Implemented in cogitant.jni.Environment.
| int cogitant.base.Environment.rulesClosure | ( | Graph | g, |
| Collection< Rule > | r, | ||
| int | maxapp, | ||
| int | maxpasses | ||
| ) | throws cogitant.base.Exception |
Closure of a graph.
| g | a graph of the Environment. This graph is modified and contains the closure of the initial graph with the set of rules. |
| r | a set of rules. If null every rule of the Environment is taken into account. |
| maxapp | maximal number of rule applications (0: unlimited). |
| maxpasses | maximal number of passes. (0: unlimited). |
| int cogitant.base.Environment.rulesClosureNormalize | ( | Graph | g, |
| Collection< Rule > | r, | ||
| int | maxapp, | ||
| int | maxpasses | ||
| ) | throws cogitant.base.Exception |
Closure of a graph + Normalize.
Normalizes g after each application of a rule.
| g | a graph of the Environment. This graph is modified and contains the closure of the initial graph with the set of rules. |
| r | a set of rules. If null every rule of the Environment is taken into account. |
| maxapp | maximal number of rule applications (0: unlimited). |
| maxpasses | maximal number of passes. (0: unlimited). |
| String cogitant.base.Environment.saveObjectsString | ( | Collection< EnvironmentObject > | obj, |
| IOHandler.Format | format | ||
| ) | throws ExceptionIO |
Save objects into a string.
| obj | objects. |
| format | output format. |
| String cogitant.base.Environment.saveObjectString | ( | EnvironmentObject | obj, |
| IOHandler.Format | format | ||
| ) | throws ExceptionIO |
Save object into a string.
| obj | object. |
| format | output format. |
| String cogitant.base.Environment.saveSupportString | ( | IOHandler.Format | format | ) | throws ExceptionIO |
Save the support into a string.
| format | output format. |
| void cogitant.base.Environment.setIOConfig | ( | IOHandler.ConfigPropertyBool | prop, |
| boolean | val | ||
| ) |
Change I/O configuration.
| prop | property. |
| val | value. |
Implemented in cogitant.jni.Environment.
| Support cogitant.base.Environment.support | ( | ) |
Implemented in cogitant.jni.Environment.