V
- the type of FeatureVector this subspace containspublic class Subspace<V extends FeatureVector<V,?>> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Subspace.DimensionComparator
A comparator for subspaces based on their involved dimensions.
|
Modifier and Type | Field and Description |
---|---|
private int |
dimensionality
The dimensionality of this subspace.
|
private BitSet |
dimensions
The dimensions building this subspace.
|
Constructor and Description |
---|
Subspace(BitSet dimensions)
Creates a new k-dimensional subspace of the original data space.
|
Subspace(int dimension)
Creates a new one-dimensional subspace of the original data space.
|
Modifier and Type | Method and Description |
---|---|
int |
dimensionality()
Returns the dimensionality of this subspace.
|
String |
dimensonsToString()
Returns a string representation of the dimensions of this subspace
separated by comma.
|
String |
dimensonsToString(String sep)
Returns a string representation of the dimensions of this subspace.
|
boolean |
equals(Object obj)
Indicates if the specified object is equal to this subspace, i.e. if the
specified object is a Subspace and is built of the same dimensions than
this subspace.
|
BitSet |
getDimensions()
Returns the BitSet representing the dimensions of this subspace.
|
int |
hashCode()
Returns the hash code value of the
dimensions of this subspace. |
boolean |
isSubspace(Subspace<V> subspace)
Returns true if this subspace is a subspace of the specified subspace, i.e.
|
Subspace<V> |
join(Subspace<V> other)
Joins this subspace with the specified subspace.
|
protected BitSet |
joinLastDimensions(Subspace<V> other)
Joins the dimensions of this subspace with the dimensions of the specified
subspace.
|
String |
toString()
Returns a string representation of this subspace by calling
toString() with an empty prefix. |
String |
toString(String pre)
Returns a string representation of this subspace that contains the given
string prefix and the dimensions of this subspace.
|
private final BitSet dimensions
private final int dimensionality
public Subspace(int dimension)
dimension
- the dimension building this subspacepublic Subspace(BitSet dimensions)
dimensions
- the dimensions building this subspacepublic final BitSet getDimensions()
public final int dimensionality()
public Subspace<V> join(Subspace<V> other)
other
- the subspace to joinjoinLastDimensions(Subspace)
public String toString()
toString()
with an empty prefix.public String toString(String pre)
pre
- a string prefix for each row of this string representationpublic String dimensonsToString()
public String dimensonsToString(String sep)
sep
- the separator between the dimensionspublic boolean isSubspace(Subspace<V> subspace)
subspace
- the subspace to testprotected BitSet joinLastDimensions(Subspace<V> other)
other
- the subspace to joinpublic int hashCode()
dimensions
of this subspace.public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)