marf.Storage
Class Result

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

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

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.16 2005/06/16 19:58:54 mokhov Exp $

Since:
0.0.1
Version:
$Revision: 1.16 $
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.
 
Method Summary
 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
clone, 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
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

setDescription

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

Parameters:
pstrDescription - description string
Since:
0.3.0

getMARFSourceCodeRevision

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

Returns:
revision string
Since:
0.3.0