org.semanticweb.elk.reasoner.taxonomy.hashing
Class NodeHasher

java.lang.Object
  extended by org.semanticweb.elk.reasoner.taxonomy.hashing.NodeHasher
All Implemented Interfaces:
Hasher<Node<? extends ElkEntity>>

public class NodeHasher
extends Object
implements Hasher<Node<? extends ElkEntity>>

Helper class for hashing Nodes based on getMembers(). Implements some caching to ensure good performance even when some nodes have unusually many members.

Author:
Markus Kroetzsch, Frantisek Simancik

Field Summary
static NodeHasher INSTANCE
          We use one static instance for hashing (and caching!) all nodes.
 
Method Summary
 int hash(Node<? extends ElkEntity> node)
          Compute the hash for an entity node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static NodeHasher INSTANCE
We use one static instance for hashing (and caching!) all nodes.

Method Detail

hash

public int hash(Node<? extends ElkEntity> node)
Compute the hash for an entity node. This method implements a simple cache for nodes with unusually large numbers of members. This mainly covers the case where a huge number of classes is equal to owl:Nothing due to modelling errors.

Specified by:
hash in interface Hasher<Node<? extends ElkEntity>>
Parameters:
node -
Returns:
the has for the given entity node


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.