Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.lattice.Node< Label > Class Reference
Collaboration diagram for joshua.lattice.Node< Label >:
[legend]

List of all members.

Public Member Functions

 Node (int id)
int getNumber ()
Iterable< Arc< Label > > getOutgoingArcs ()
Iterable< Node< Label > > reachableNodes ()
void addArc (Node< Label > destination, double weight, Label label)
int size ()
String toString ()

Package Attributes

final Integer id
final List< Arc< Label > > outgoingArcs

Detailed Description

A node in a directed graph.

Author:
Lane Schwartz
Since:
2008-07-08
Version:
$LastChangedDate$
Parameters:
<Label>Type of label associated with an arc.

Constructor & Destructor Documentation

joshua.lattice.Node< Label >.Node ( int  id)

Constructs a new node with the specified numeric identifier.


Member Function Documentation

void joshua.lattice.Node< Label >.addArc ( Node< Label >  destination,
double  weight,
Label  label 
)

Adds a new outgoing arc to this node that points to the specified destination. The new arc will have the specified weight and specified label.

Parameters:
destinationDestination node of the new outgoing arc.
weightWeight of the new outgoing arc.
labelLabel of the new outgoing arc.
int joshua.lattice.Node< Label >.getNumber ( )

Gets the numeric integer identifier of this node.

Returns:
Numeric integer identifier of this node.
Iterable<Arc<Label> > joshua.lattice.Node< Label >.getOutgoingArcs ( )

Gets the arcs that begin at this node.

Returns:
The arcs that begin at this node.
Iterable<Node<Label> > joshua.lattice.Node< Label >.reachableNodes ( )

Gets an iterable object capable of iterating over all nodes directly reachable from this node. This will be all nodes which are the target of an outgoing arc from this node.

Returns:
An iterable object capable of iterating over all nodes directly reachable from this node.
int joshua.lattice.Node< Label >.size ( )

Gets the number of outgoing arcs that begin at this node.

Returns:
The number of outgoing arcs that begin at this node.
String joshua.lattice.Node< Label >.toString ( )

Member Data Documentation

final Integer joshua.lattice.Node< Label >.id [package]

Numeric integer identifier of this node. Package-private scope so that Lattice can quickly access this variable.

final List<Arc<Label> > joshua.lattice.Node< Label >.outgoingArcs [package]

Arcs which begin at this node. Package-private scope so that Lattice can quickly access this variable.