|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwater.Iced
water.fvec.Frame
public class Frame
A collection of named Vecs. Essentially an R-like data-frame. Multiple Frames can reference the same Vecs. A Frame is a lightweight object, it is meant to be cheaply created and discarded for data munging purposes. E.g. to exclude a Vec from a computation on a Frame, create a new Frame that references all the Vecs but this one.
| Field Summary | |
|---|---|
java.lang.String[] |
_names
|
| Constructor Summary | |
|---|---|
Frame(Frame fr)
|
|
Frame(java.lang.String[] names,
Vec[] vecs)
|
|
Frame(Vec... vecs)
|
|
| Method Summary | |
|---|---|
Frame |
add(Frame fr)
Appends an entire Frame |
void |
add(java.lang.String name,
Vec vec)
Appends a named column, keeping the last Vec as the response |
Vec |
anyVec()
Returns the first readable vector. |
long |
byteSize()
|
void |
checkCompatible()
Check that the vectors are all compatible. |
void |
closeAppendables()
|
Futures |
closeAppendables(Futures fs)
|
Frame |
deepSlice(java.lang.Object orows,
java.lang.Object ocols)
|
java.lang.String[][] |
domains()
All the domains for enum columns; null for non-enum columns. |
Frame |
extractFrame(int startIdx,
int endIdx)
|
int |
find(java.lang.String name)
Finds the first column with a matching name. |
int |
find(Vec vec)
|
java.lang.String[] |
names()
|
int |
numCols()
|
int |
numExpCols()
|
long |
numRows()
|
Vec[] |
reloadVecs()
|
void |
remove()
|
void |
remove(Futures fs)
Actually remove/delete all Vecs from memory, not just from the Frame. |
Vec |
remove(int idx)
Removes a numbered column. |
Vec[] |
remove(int[] idxs)
Removes a numbered column. |
Vec[] |
remove(int startIdx,
int endIdx)
Remove given interval of columns from frame. |
Vec |
remove(java.lang.String name)
Removes the first column with a matching name. |
Vec |
replace(int col,
Vec nv)
|
Frame |
subframe(int startIdx,
int endIdx)
Create a subframe from given interval of columns. |
java.io.InputStream |
toCSV(boolean headers)
|
java.lang.String |
toString()
|
java.lang.String |
toString(long idx)
|
java.lang.StringBuilder |
toString(java.lang.StringBuilder sb,
java.lang.String[] fs,
long idx)
|
java.lang.String |
toStringAll()
|
java.lang.String[] |
toStringHdr(java.lang.StringBuilder sb)
|
Vec[] |
vecs()
|
| Methods inherited from class water.Iced |
|---|
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String[] _names
| Constructor Detail |
|---|
public Frame(Frame fr)
public Frame(Vec... vecs)
public Frame(java.lang.String[] names,
Vec[] vecs)
| Method Detail |
|---|
public final Vec[] vecs()
public final Vec[] reloadVecs()
public int find(java.lang.String name)
public int find(Vec vec)
public void add(java.lang.String name,
Vec vec)
public Frame add(Frame fr)
public Vec remove(java.lang.String name)
public Vec[] remove(int[] idxs)
public Vec remove(int idx)
public Vec[] remove(int startIdx,
int endIdx)
startIdx - - start index of column (inclusive)endIdx - - end index of column (exclusive)
public Vec replace(int col,
Vec nv)
public Frame extractFrame(int startIdx,
int endIdx)
public Frame subframe(int startIdx,
int endIdx)
startIdx - index of first column (inclusive)endIdx - index of the last column (exclusive)
public final java.lang.String[] names()
public int numCols()
public long numRows()
public int numExpCols()
public java.lang.String[][] domains()
public Vec anyVec()
public void checkCompatible()
public void closeAppendables()
public Futures closeAppendables(Futures fs)
public void remove()
public void remove(Futures fs)
public long byteSize()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(long idx)
public java.lang.String[] toStringHdr(java.lang.StringBuilder sb)
public java.lang.StringBuilder toString(java.lang.StringBuilder sb,
java.lang.String[] fs,
long idx)
public java.lang.String toStringAll()
public java.io.InputStream toCSV(boolean headers)
public Frame deepSlice(java.lang.Object orows,
java.lang.Object ocols)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||