Home Reference Source
public class | source

BaseFrame

Direct Subclass:

Frame

Used to from the base class for a Frame, This is added to break circular import reference from hasFrame(aFrame) function Originally hasFrame imported frame and frame imported hasFrame. In order to break taht up we now include BaseFrame from both Frame and hasFrame.

Constructor Summary

Public Constructor
public

constructor(data: [type], columns: [type], name: [type], keyFunc: [type]): [type]

[constructor description]

Member Summary

Public Members
public get

columns: [type]

[columns description]

public
public get
public
public get
public get
Private Members
private
private
private
private

Method Summary

Public Methods
public

asStrList(): [string]

An arry of strings, where the string the is a list of tab seperated column values

public

colIx(name: [type]): [type]

[colIx description]

public

column(colName: [type]): [type]

Simple version of project to create a frame with only one column

public

equal()

public

filterRaw(fn: function, keyFunc: string | function]): [type]

[description]

public

forEachRaw(fn: function): [type]

[description]

public

getKey(i: [type]): [type]

[getKey description]

public
public

mapRaw(fn: Function, newCols: [string]): Frame

This is the functional equivenent of Array.map for a Frame

public

Array of column names the are predominantly numeric, the values may be number or number like staring \ * @return {[string]} array of column names that are predominantly numeric

public

rawColumn(colName: string): [any]

rawColumn get the column given by the 'colName'

public

reduceRaw(fn: Function, ini: any): any

Basically this is the equivelat to reduce performed on the data array, this is an array of rows as the elemnt passed to reduc

public

row(ix: number): [any]

Get the row vector

public
public

setData(d: [[string]], name: String)

Create a new frame based of this frame but with new data

public

setKey()

public
public

slice(first: number, last: number): Frame

Similar functionality to array slice

Private Methods
private

Public Constructors

public constructor(data: [type], columns: [type], name: [type], keyFunc: [type]): [type] source

[constructor description]

Params:

NameTypeAttributeDescription
data [type]

[description]

columns [type]

[description]

name [type]

[description]

keyFunc [type]

[description]

Return:

[type]

[description]

Public Members

public get columns: [type] source

[columns description]

Return:

[type]

[description]

public data source

public get hash source

public keyFunc source

public get length source

public get name source

Private Members

private _columns source

private _key source

private _keyFunc source

private _name source

Public Methods

public asStrList(): [string] source

An arry of strings, where the string the is a list of tab seperated column values

Return:

[string]

each element of the array is an string represention of a corresponding row

public colIx(name: [type]): [type] source

[colIx description]

Params:

NameTypeAttributeDescription
name [type]

[description]

Return:

[type]

[description]

public column(colName: [type]): [type] source

Simple version of project to create a frame with only one column

Params:

NameTypeAttributeDescription
colName [type]

[description]

Return:

[type]

[description]

public equal() source

public filterRaw(fn: function, keyFunc: string | function]): [type] source

[description]

Params:

NameTypeAttributeDescription
fn function

filter function to apply to a row if returns true keep the row otherwise discard the row

keyFunc string | function]

the key column name, or thekey computing function

Return:

[type]

[description]

public forEachRaw(fn: function): [type] source

[description]

Params:

NameTypeAttributeDescription
fn function

takes function(row:array, ix, array)

Return:

[type]

[description]

public getKey(i: [type]): [type] source

[getKey description]

Params:

NameTypeAttributeDescription
i [type]

[description]

Return:

[type]

[description]

public keyName() source

public mapRaw(fn: Function, newCols: [string]): Frame source

This is the functional equivenent of Array.map for a Frame

Params:

NameTypeAttributeDescription
fn Function

[description]

newCols [string]

[description]

Return:

Frame

map each row of the frame through 'fn' to get a new frame

public numericColumns() source

Array of column names the are predominantly numeric, the values may be number or number like staring \ * @return {[string]} array of column names that are predominantly numeric

public rawColumn(colName: string): [any] source

rawColumn get the column given by the 'colName'

Params:

NameTypeAttributeDescription
colName string

name of a column of the frame;

Return:

[any]

array representing the values of a column identified by colName

public reduceRaw(fn: Function, ini: any): any source

Basically this is the equivelat to reduce performed on the data array, this is an array of rows as the elemnt passed to reduc

Params:

NameTypeAttributeDescription
fn Function

[description]

ini any

the starting value for reduce

Return:

any

the type is the return type of the fuction 'fn'

public row(ix: number): [any] source

Get the row vector

Params:

NameTypeAttributeDescription
ix number

the index number of a row

Return:

[any]

the row aray for index 'ix'

public setColumns() source

public setData(d: [[string]], name: String) source

Create a new frame based of this frame but with new data

Params:

NameTypeAttributeDescription
d [[string]]

new data for the frame (but with the same columns

name String

optional ne name

public setKey() source

public setName() source

public slice(first: number, last: number): Frame source

Similar functionality to array slice

Params:

NameTypeAttributeDescription
first number

start index

last number

the last index + 1 of the data

Return:

Frame

new frame representing the subset of the rows between firsr and last (excluding position last)

Private Methods

private _getKey() source