Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data.model
Class Bicluster<V extends RealVector<V,Double>>

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

public class Bicluster<V extends RealVector<V,Double>>
extends Object
implements TextWriteable, Model

Wrapper class to provide the basic properties of a bicluster.

Author:
Arthur Zimek

Field Summary
private  int[] colIDs
          The ids of the rows included in the bicluster.
private  Database<V> database
          The database this bicluster is defined for.
private  int[] rowIDs
          The ids of the rows included in the bicluster.
 
Constructor Summary
Bicluster(int[] rowIDs, int[] colIDs, Database<V> database)
          Defines a new bicluster for given parameters.
 
Method Summary
 int[] getColumnIDs()
          Provides a copy of the column IDs contributing to the bicluster.
 Database<V> getDatabase()
          Getter to retrieve the database
 DatabaseObjectGroup getDatabaseObjectGroup()
          Creates a DatabaseObjectGroup 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 int[] 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 Database<V extends RealVector<V,Double>> database
The database this bicluster is defined for.

Constructor Detail

Bicluster

public Bicluster(int[] rowIDs,
                 int[] colIDs,
                 Database<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
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 DatabaseObjectGroup getDatabaseObjectGroup()
Creates a DatabaseObjectGroup for the row IDs included in this Bicluster.

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

getDatabase

public Database<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.2 (2009-07-06_1820)