public class AttributeVector
extends java.lang.Object
| Constructor and Description |
|---|
AttributeVector(Attribute attribute,
double[] vector)
Constructor.
|
AttributeVector(Attribute attribute,
double[] vector,
java.lang.String[] names)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Attribute |
attribute()
Returns the attribute.
|
java.lang.String |
head(int n)
Shows the first few rows.
|
java.lang.String[] |
names()
Returns the name vector.
|
int |
size()
Returns the vector size.
|
AttributeVector |
summary()
Returns statistic summary.
|
java.lang.String |
tail(int n)
Shows the last few rows.
|
java.lang.String |
toString() |
java.lang.String |
toString(int from,
int to)
Stringify the vector.
|
double[] |
vector()
Returns the data vector.
|
public AttributeVector(Attribute attribute, double[] vector)
attribute - the attribute information.vector - the data vector.public AttributeVector(Attribute attribute, double[] vector, java.lang.String[] names)
attribute - the attribute information.vector - the data vector.names - optional names for each element.public Attribute attribute()
public double[] vector()
public java.lang.String[] names()
public int size()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String head(int n)
public java.lang.String tail(int n)
public java.lang.String toString(int from,
int to)
from - starting row (inclusive)to - ending row (exclusive)public AttributeVector summary()