marf.Storage
Class Result

java.lang.Object
  extended by marf.Storage.Result
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Result
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Represents a single classification result - ID and some value indicating either certain distance from the sample being recognized or a probability.

$Id: Result.java,v 1.22 2006/01/02 22:24:00 mokhov Exp $

Since:
0.0.1
Version:
$Revision: 1.22 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
protected  double dOutcome
          Distance/probability.
protected  int iID
          Identified subject's ID.
protected  java.lang.String strDescription
          Textual result description.
 
Constructor Summary
Result()
          Default Constructor.
Result(double pdOutcome, java.lang.String pstrDescription)
          Outcome/description Constructor.
Result(int piID)
          ID Constructor.
Result(int piID, double pdOutcome)
          ID/outcome Constructor.
Result(int piID, double pdOutcome, java.lang.String pstrDescription)
          General ID/outcome/description Constructor.
Result(int piID, java.lang.String pstrDescription)
          ID/description Constructor.
Result(Result poResult)
          Copy-constructor.
 
Method Summary
 java.lang.Object clone()
          Implements Cloneable interface for the Result object.
 java.lang.String getDescription()
          Retrieves textual description of the result.
 int getID()
          Returns result's ID.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 double getOutcome()
          Retrieves the outcome value.
 void setDescription(java.lang.String pstrDescription)
          Sets description of the result.
 void setID(int piID)
          Sets ID, should only be called by a Classification module.
 void setOutcome(double pdOutcome)
          Sets outcome value.
 java.lang.String toString()
          Retrieves the result values in a form of string, which is of the following form: [ID:outcome:description].
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

iID

protected int iID
Identified subject's ID.


strDescription

protected java.lang.String strDescription
Textual result description.

Since:
0.3.0

dOutcome

protected double dOutcome
Distance/probability.

Since:
0.3.0
Constructor Detail

Result

public Result()
Default Constructor. Equivalent to Result(0)


Result

public Result(int piID)
ID Constructor. Equivalent to Result(piID, 0, "").

Parameters:
piID - integer ID of the speaker

Result

public Result(int piID,
              double pdOutcome)
ID/outcome Constructor. Equivalent to Result(piID, pdOutcome, "").

Parameters:
piID - integer ID of the subject
pdOutcome - distance/probability of the result
Since:
0.3.0

Result

public Result(int piID,
              java.lang.String pstrDescription)
ID/description Constructor. Equivalent to Result(piID, 0, pstrDescription).

Parameters:
piID - integer ID of the subject
pstrDescription - textual description of the result
Since:
0.3.0

Result

public Result(double pdOutcome,
              java.lang.String pstrDescription)
Outcome/description Constructor. Equivalent to Result(0, pdOutcome, pstrDescription).

Parameters:
pdOutcome - distance/probability of the result
pstrDescription - textual description of the result
Since:
0.3.0

Result

public Result(int piID,
              double pdOutcome,
              java.lang.String pstrDescription)
General ID/outcome/description Constructor.

Parameters:
piID - integer ID of the subject
pdOutcome - distance/probability of the result
pstrDescription - textual description of the result
Since:
0.3.0

Result

public Result(Result poResult)
Copy-constructor.

Parameters:
poResult - Result object to copy data from
Since:
0.3.0.5
Method Detail

getID

public final int getID()
Returns result's ID.

Returns:
ID of an entity (speaker, instrument, language, etc)

getOutcome

public final double getOutcome()
Retrieves the outcome value.

Returns:
distance/probability of the result
Since:
0.3.0

getDescription

public final java.lang.String getDescription()
Retrieves textual description of the result.

Returns:
string describing the result
Since:
0.3.0

toString

public java.lang.String toString()
Retrieves the result values in a form of string, which is of the following form: [ID:outcome:description].

Overrides:
toString in class java.lang.Object
Returns:
string representation of the Result object
Since:
0.3.0

setID

public final void setID(int piID)
Sets ID, should only be called by a Classification module.

Parameters:
piID - ID of the subject classified

setOutcome

public final void setOutcome(double pdOutcome)
Sets outcome value.

Parameters:
pdOutcome - resulting outcome
Since:
0.3.0.2

setDescription

public final void setDescription(java.lang.String pstrDescription)
Sets description of the result.

Parameters:
pstrDescription - description string
Since:
0.3.0.2

clone

public java.lang.Object clone()
Implements Cloneable interface for the Result object.

Overrides:
clone in class java.lang.Object
Since:
0.3.0.5
See Also:
Object.clone()

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string
Since:
0.3.0.2


SourceForge Logo