Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.corpus.Span Class Reference

List of all members.

Public Member Functions

 Span (int start, int end)
int size ()
List< SpangetSubSpans ()
List< SpangetSubSpans (int max)
boolean strictlyContainedIn (Span o)
boolean disjointFrom (Span o)
String toString ()
Iterator< Integer > iterator ()
int compareTo (Span o)
boolean equals (Object o)
int hashCode ()

Public Attributes

int start
int end

Detailed Description

Represents a span with an inclusive starting index and an exclusive ending index.

Author:
Lane Schwartz
Version:
LastChangedDate:
008-09-18 12:47:23 -0500 (Thu, 18 Sep 2008)

Constructor & Destructor Documentation

joshua.corpus.Span.Span ( int  start,
int  end 
)

Constructs a new span with the given inclusive starting and exclusive ending indices.

Parameters:
startInclusive starting index of this span.
endExclusive ending index of this span.

Here is the caller graph for this function:


Member Function Documentation

boolean joshua.corpus.Span.equals ( Object  o)

Here is the call graph for this function:

Returns all subspans of the given Span.

Returns:
a list of all subspans.

Here is the call graph for this function:

Returns all subspans of the given Span, up to a specified Span size.

Parameters:
maxthe maximum Span size to return
Returns:
a list all subspans up to the given size

Here is the call graph for this function:

Iterator<Integer> joshua.corpus.Span.iterator ( )

Returns the length of the span.

Returns:
the length of the span; this is equivalent to span.end - span.start.

Here is the caller graph for this function:


Member Data Documentation

Exclusive ending index of this span.

Inclusive starting index of this span.