Mobios v0.91

mobios.type
Class Image

java.lang.Object
  extended by mobios.type.IndexObject
      extended by mobios.type.Image
All Implemented Interfaces:
Externalizable, Serializable, Comparable<IndexObject>

public class Image
extends IndexObject

TODO This is the key of Image. This object stores an array of floating numbers representing the key for image object. It is designed only for MoBIoS image dataset, might not work for other datasets.

Version:
2006.07.26
Author:
Wenguo Liu, Ru Mao, Willard
See Also:
Serialized Form

Constructor Summary
Image()
           
Image(mobios.db.Table table, int rowID, float[] feas)
           
Image(mobios.db.Table table, int rowID, float[] feas, double[] maxDist)
           
 
Method Summary
 int compareTo(IndexObject oThat)
           
 boolean equals(Object other)
           
 IndexObject[] expand()
          This method is necessary to implement bucketing, so that similar objects are only stored once in the database.
 float getFeature(int index)
           
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 int size()
           
 String toString()
          all implementing classes are required to override toString
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class mobios.type.IndexObject
getRowID, setRowID, setRowIDLength
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Image

public Image()

Image

public Image(mobios.db.Table table,
             int rowID,
             float[] feas)

Image

public Image(mobios.db.Table table,
             int rowID,
             float[] feas,
             double[] maxDist)
Parameters:
table -
rowID -
feas - an array of floats over which the feature values are defined.
maxDist -
Method Detail

getFeature

public float getFeature(int index)
Parameters:
index -
Returns:

size

public int size()
Specified by:
size in class IndexObject
Returns:
the size of the object

expand

public IndexObject[] expand()
Description copied from class: IndexObject
This method is necessary to implement bucketing, so that similar objects are only stored once in the database. If you do not want to implement bucketing for your object, you can just return an array of length one containing this object.

Specified by:
expand in class IndexObject
Returns:
an array of IndexObjects

compareTo

public int compareTo(IndexObject oThat)
Specified by:
compareTo in interface Comparable<IndexObject>
Specified by:
compareTo in class IndexObject

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Description copied from class: IndexObject
all implementing classes are required to override toString

Specified by:
toString in class IndexObject

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class IndexObject
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class IndexObject
Throws:
IOException
ClassNotFoundException

Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group