public class Subspace 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 long[] |
dimensions
The dimensions building this subspace.
|
Constructor and Description |
---|
Subspace(int dimension)
Creates a new one-dimensional subspace of the original data space.
|
Subspace(long[] dimensions)
Creates a new k-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.
|
long[] |
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 subspace)
Returns true if this subspace is a subspace of the specified subspace, i.e.
|
Subspace |
join(Subspace other)
Joins this subspace with the specified subspace.
|
protected long[] |
joinLastDimensions(Subspace 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 long[] dimensions
private final int dimensionality
public Subspace(int dimension)
dimension
- the dimension building this subspacepublic Subspace(long[] dimensions)
dimensions
- the dimensions building this subspacepublic final long[] getDimensions()
public final int dimensionality()
public Subspace join(Subspace 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 subspace)
subspace
- the subspace to testprotected long[] joinLastDimensions(Subspace other)
other
- the subspace to joinpublic int hashCode()
dimensions
of this subspace.Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.