gov.sandia.cognition.framework
Interface SemanticNetwork

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultSemanticNetwork

public interface SemanticNetwork
extends Serializable

The SemanticNetwork interface defines the functionality required for a network that is used as part of the paramterization to a SemanticMemory.

Since:
1.0
Author:
Justin Basilico, Kevin R. Dixon

Method Summary
 double getAssociation(SemanticLabel from, SemanticLabel to)
          Gets the association between two nodes in the network.
 Collection<SemanticLabel> getNodes()
          Gets the nodes that are in the network.
 int getNumNodes()
          Gets the total number of nodes in the network.
 Collection<SemanticLabel> getOutLinks(SemanticLabel nodeLabel)
          Gets the outgoing links from a given node.
 boolean isNode(SemanticLabel label)
          Returns true if the given SemanticLabel is a node in the SemanticNetwork.
 

Method Detail

getNumNodes

int getNumNodes()
Gets the total number of nodes in the network.

Returns:
The total number of nodes in the network

isNode

boolean isNode(SemanticLabel label)
Returns true if the given SemanticLabel is a node in the SemanticNetwork.

Parameters:
label - The label to evaluate.
Returns:
True if the given label is a node in the network and false otherwise.

getNodes

Collection<SemanticLabel> getNodes()
Gets the nodes that are in the network.

Returns:
The collection of nodes in the network.

getOutLinks

Collection<SemanticLabel> getOutLinks(SemanticLabel nodeLabel)
Gets the outgoing links from a given node.

Parameters:
nodeLabel - The node to get the outgoing links from
Returns:
The collection of outgoing links from the given node. If the given node is not in the network, null is to be returned.

getAssociation

double getAssociation(SemanticLabel from,
                      SemanticLabel to)
Gets the association between two nodes in the network.

Parameters:
from - The node the association is from
to - The node the association is to
Returns:
The association between the given nodes