de.lmu.ifi.dbs.elki.data.model
Class Bicluster<V extends FeatureVector<?,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.data.model.Bicluster<V>
Type Parameters:
V - the type of NumberVector handled by this Result
All Implemented Interfaces:
Model, TextWriteable
Direct Known Subclasses:
BiclusterWithInverted

public class Bicluster<V extends FeatureVector<?,?>>
extends Object
implements TextWriteable, Model

Wrapper class to provide the basic properties of a bicluster.


Field Summary
private  int[] colIDs
          The ids of the rows included in the bicluster.
private  Relation<V> database
          The database this bicluster is defined for.
private  ArrayDBIDs rowIDs
          The ids of the rows included in the bicluster.
 
Constructor Summary
Bicluster(ArrayDBIDs rowIDs, int[] colIDs, Relation<V> database)
          Defines a new bicluster for given parameters.
Bicluster(int[] rowIDs, int[] colIDs, Relation<V> database)
          Deprecated. Use DBIDs, not integers!
 
Method Summary
 int[] getColumnIDs()
          Provides a copy of the column IDs contributing to the bicluster.
 Relation<V> getDatabase()
          Getter to retrieve the database
 DBIDs getDatabaseObjectGroup()
          Creates a DBIDs for the row IDs included in this Bicluster.
 Iterator<V> rowIterator()
          Provides an iterator for the row ids.
 int size()
          The size of the cluster.
 void sortIDs()
          Sorts the row and column ids in ascending order.
 void writeToText(TextWriterStream out, String label)
          Implementation of TextWriteable interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rowIDs

private ArrayDBIDs rowIDs
The ids of the rows included in the bicluster.


colIDs

private int[] colIDs
The ids of the rows included in the bicluster.


database

private Relation<V extends FeatureVector<?,?>> database
The database this bicluster is defined for.

Constructor Detail

Bicluster

public Bicluster(ArrayDBIDs rowIDs,
                 int[] colIDs,
                 Relation<V> database)
Defines a new bicluster for given parameters.

Parameters:
rowIDs - the ids of the rows included in the bicluster
colIDs - the ids of the columns included in the bicluster
database - the database this bicluster is defined for

Bicluster

@Deprecated
public Bicluster(int[] rowIDs,
                            int[] colIDs,
                            Relation<V> database)
Deprecated. Use DBIDs, not integers!

Defines a new bicluster for given parameters.

Parameters:
rowIDs - the ids of the rows included in the bicluster
colIDs - the ids of the columns included in the bicluster
database - the database this bicluster is defined for
Method Detail

sortIDs

public void sortIDs()
Sorts the row and column ids in ascending order.


size

public int size()
The size of the cluster.

The size of a bicluster is the number of included rows.

Returns:
the size of the bicluster, i.e., the number or rows included in the bicluster

rowIterator

public Iterator<V> rowIterator()
Provides an iterator for the row ids.

Note that the iterator is not guaranteed to touch all elements if the sortIDs() is called during the lifetime of the iterator.

Returns:
an iterator for the row ids

getDatabaseObjectGroup

public DBIDs getDatabaseObjectGroup()
Creates a DBIDs for the row IDs included in this Bicluster.

Returns:
a DBIDs for the row IDs included in this Bicluster

getDatabase

public Relation<V> getDatabase()
Getter to retrieve the database

Returns:
Database

getColumnIDs

public int[] getColumnIDs()
Provides a copy of the column IDs contributing to the bicluster.

Returns:
a copy of the columnsIDs

writeToText

public void writeToText(TextWriterStream out,
                        String label)
Implementation of TextWriteable interface.

Specified by:
writeToText in interface TextWriteable
Parameters:
out - Output writer
label - Label

Release 0.4.0 (2011-09-20_1324)