org.dllearner.algorithms.el
Class ELDescriptionTree

java.lang.Object
  extended by org.dllearner.algorithms.el.ELDescriptionTree
All Implemented Interfaces:
Cloneable

public class ELDescriptionTree
extends Object
implements Cloneable

Represents an EL description tree. Unlike ELDescriptionNode, this is a tree-wide structure, i.e. it does not implement the tree structure itself, but is used to store information about the tree.

Author:
Jens Lehmann

Constructor Summary
ELDescriptionTree(AbstractReasonerComponent rs)
           
ELDescriptionTree(AbstractReasonerComponent rs, Description description)
          Constructs an EL description tree from an EL description.
 
Method Summary
 boolean checkSC(ELDescriptionNode node1, ELDescriptionNode node2)
           
 boolean checkSC1(ELDescriptionNode node1, ELDescriptionNode node2)
           
 boolean checkSC2(ELDescriptionNode node1, ELDescriptionNode node2)
           
 ELDescriptionTree clone()
           
 ELDescriptionTree cloneOld()
           
 void extendSimulation(ELDescriptionNode node1, ELDescriptionNode node2)
           
 void extendSimulationSC1(ELDescriptionNode node1, ELDescriptionNode node2)
           
 void extendSimulationSC12(ELDescriptionNode node1, ELDescriptionNode node2)
           
 void extendSimulationSC2(ELDescriptionNode node1, ELDescriptionNode node2)
           
 int getDepth()
           
 int getMaxLevel()
           
 ELDescriptionNode getNode(int[] position)
          Gets the node at the given position.
 Collection<ELDescriptionNode> getNodes()
           
 Set<ELDescriptionNode> getNodesOnLevel(int level)
          Gets the nodes on a specific level of the tree.
 ELDescriptionNode getRootNode()
           
 int getSize()
          size of tree = number of nodes + sum of cardinality of node labels
 boolean isMinimal()
           
 void shrinkSimulation(ELDescriptionNode node1, ELDescriptionNode node2)
           
 void shrinkSimulationSC1(ELDescriptionNode node1, ELDescriptionNode node2)
           
 void shrinkSimulationSC12(ELDescriptionNode node1, ELDescriptionNode node2)
           
 void shrinkSimulationSC2(ELDescriptionNode node1, ELDescriptionNode node2)
           
 String toDescriptionString()
          Returns a string of the tree description (without the overhead of converting the tree into a description).
 String toSimulationString()
           
 String toSimulationString(Map<ELDescriptionNode,String> nodeNames)
           
 String toString()
           
 Description transformToDescription()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ELDescriptionTree

public ELDescriptionTree(AbstractReasonerComponent rs)

ELDescriptionTree

public ELDescriptionTree(AbstractReasonerComponent rs,
                         Description description)
Constructs an EL description tree from an EL description.

Parameters:
description - A description
Method Detail

getNodesOnLevel

public Set<ELDescriptionNode> getNodesOnLevel(int level)
Gets the nodes on a specific level of the tree. This information is cached here for performance reasons.

Parameters:
level - The level (distance from root node).
Returns:
The set of all nodes on the specified level within this tree.

transformToDescription

public Description transformToDescription()

isMinimal

public boolean isMinimal()

getMaxLevel

public int getMaxLevel()
Returns:
the maxLevel

getRootNode

public ELDescriptionNode getRootNode()
Returns:
the rootNode

getNode

public ELDescriptionNode getNode(int[] position)
Gets the node at the given position. The list is processed as follows: Starting with the root node, the first element i of list is read and the i-th child of root node is selected. This node is set as current node and the next element j of the list is read and the j-th child of the i-th child of the root node selected etc.

Returns:
The node at the specified position.

checkSC

public boolean checkSC(ELDescriptionNode node1,
                       ELDescriptionNode node2)

checkSC1

public boolean checkSC1(ELDescriptionNode node1,
                        ELDescriptionNode node2)

checkSC2

public boolean checkSC2(ELDescriptionNode node1,
                        ELDescriptionNode node2)

extendSimulation

public void extendSimulation(ELDescriptionNode node1,
                             ELDescriptionNode node2)

extendSimulationSC1

public void extendSimulationSC1(ELDescriptionNode node1,
                                ELDescriptionNode node2)

extendSimulationSC2

public void extendSimulationSC2(ELDescriptionNode node1,
                                ELDescriptionNode node2)

extendSimulationSC12

public void extendSimulationSC12(ELDescriptionNode node1,
                                 ELDescriptionNode node2)

shrinkSimulation

public void shrinkSimulation(ELDescriptionNode node1,
                             ELDescriptionNode node2)

shrinkSimulationSC1

public void shrinkSimulationSC1(ELDescriptionNode node1,
                                ELDescriptionNode node2)

shrinkSimulationSC2

public void shrinkSimulationSC2(ELDescriptionNode node1,
                                ELDescriptionNode node2)

shrinkSimulationSC12

public void shrinkSimulationSC12(ELDescriptionNode node1,
                                 ELDescriptionNode node2)

toSimulationString

public String toSimulationString()

toSimulationString

public String toSimulationString(Map<ELDescriptionNode,String> nodeNames)

clone

public ELDescriptionTree clone()
Overrides:
clone in class Object

cloneOld

public ELDescriptionTree cloneOld()

toString

public String toString()
Overrides:
toString in class Object

toDescriptionString

public String toDescriptionString()
Returns a string of the tree description (without the overhead of converting the tree into a description).

Returns:
A string for the description the tree stands for.

getNodes

public Collection<ELDescriptionNode> getNodes()
Returns:
the nodes

getDepth

public int getDepth()

getSize

public int getSize()
size of tree = number of nodes + sum of cardinality of node labels

Returns:
The tree size.


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann