Libraries.Compute.Statistics.Columns.NumberColumn Documentation
NumberColumn is a DataFrameColumn that contains Number objects. These objects can be undefined or not.
Inherits from: Libraries.Compute.Statistics.DataFrameColumn, Libraries.Containers.Support.Comparison, Libraries.Language.Object
Actions Documentation
Add(number value)
Parameters
- number value
Add(text value)
Parameters
- text value
AddAsResult(Libraries.Language.Compile.Interpreter.Result value)
Calculate(Libraries.Compute.Statistics.DataFrameColumnCalculation calculation)
This action conducts a calculation on this column. The calculation begins by issuing a Start action. Then if it is an iterable action, sends each data point to the class for processing. If not, it is asked to conduct the entire operation at once on the full data set. Finally, it issues an end action.
Parameters
CalculateValueCount()
CalculateValueCountAsText()
This action returns a HashTable with AsText key values and counts of the items in the column.
Return
Libraries.Containers.HashTable: a HashTable with the count for each item in the column.
CanConvertToVector()
Return
boolean
Compare(boolean a, boolean b)
This action provides a way to compare two objects. The returned values from its sole action is an integer with the value of -1 (the left item is smaller), 0 (the items are equal) or 1 (the left item is larger).It can be used to override the standard comparison in Object for various applications (e.g., sorting). In the case of booleans, by default, false is considered less than true.
Parameters
- boolean a
- boolean b
Return
integer:
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Compare(number a, number b)
This action provides a way to compare two objects. The returned values from its sole action is an integer with the value of -1 (the left item is smaller), 0 (the items are equal) or 1 (the left item is larger).It can be used to override the standard comparison in Object for various applications (e.g., sorting).
Parameters
- number a
- number b
Return
integer:
Compare(integer a, integer b)
This action provides a way to compare two objects. The returned values from its sole action is an integer with the value of -1 (the left item is smaller), 0 (the items are equal) or 1 (the left item is larger).It can be used to override the standard comparison in Object for various applications (e.g., sorting).
Parameters
- integer a
- integer b
Return
integer:
Compare(Libraries.Language.Object a, Libraries.Language.Object b)
We can manually set a comparison, which is then passed to the default sorting routines if sorting occurs.
Parameters
Return
integer:
ConvertToBooleanColumn()
Regardless of the type of this column, the system will attempt to convert it to a BooleanColumn. This may cause an error to be thrown if the types are not compatible. Attrribute: Returns the newly converted column
Return
ConvertToIntegerColumn()
Regardless of the type of this column, the system will attempt to convert it to an IntegerColumn. This may cause an error to be thrown if the types are not compatible. Attrribute: Returns the newly converted column
Return
ConvertToNumberColumn()
Regardless of the type of this column, the system will attempt to convert it to a NumberColumn. This may cause an error to be thrown if the types are not compatible. Attrribute: Returns the newly converted column
Return
ConvertToTextArray()
This action converts to a text array from the column.
Return
Libraries.Containers.Array: a version of the column as a text array.
ConvertToTextColumn()
Regardless of the type of this column, the system will attempt to convert it to a TextColumn. This may cause an error to be thrown if the types are not compatible. Attrribute: Returns the newly converted column
Return
ConvertToVector()
Return
Copy(integer rowStart, integer rowEnd, boolean sort, boolean unique)
Parameters
- integer rowStart
- integer rowEnd
- boolean sort
- boolean unique
Return
Copy()
Copy(boolean sort, boolean unique)
Copy(integer rowStart, integer rowEnd)
CopyEmpty()
This action copies the type of the data frame, but does not copy over its rows. The header name is retained.
Return
Libraries.Compute.Statistics.DataFrameColumn: the column of the appropriate type but without the data.
CopyToRow(Libraries.Compute.Statistics.DataFrameColumn column, integer to, integer from)
Parameters
- Libraries.Compute.Statistics.DataFrameColumn
- integer to
- integer from
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
Get(integer row)
GetAsBoolean(integer index)
Regardless of the type of the column, this action attempts to convert the item at the index to a boolean. Attrribute: Parameter index the item to be converted
Parameters
- integer index
Return
boolean:
GetAsDateTime(integer index)
Regardless of the type of the column, this action attempts to convert the item at the index to a date time. Attrribute: Parameter index the item to be converted
Parameters
- integer index
Return
GetAsInteger(integer index)
Parameters
- integer index
Return
integer
GetAsNumber(integer index)
Parameters
- integer index
Return
number
GetAsText(integer index)
Parameters
- integer index
Return
text
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetHeader()
This gets the header for this column.
Return
text:
GetSize()
Return
integer
GetSortComparison()
We can get the comparison used by the sorting routines. By default, this is undefined. When undefined, alphabetical sorting is used.
Return
GetUndefinedSize()
This action returns the number of items in this column that are undefined.
Return
integer: the number of items that are not defined
GetUndefinedText()
This action returns a default text string for undefined values.
Return
text:
GetUnique()
IsBooleanColumn()
This action detects whether this column ultimately stores booleans inside of it. This type of information is implementation dependent, as arbitrary columns can store these values however they see fit.
Return
boolean: true if this column stores booleans
IsDateTimeColumn()
This action detects whether this column ultimately stores dates/times inside of it. This type of information is implementation dependent, as arbitrary columns can store these values however they see fit.
Return
boolean: true if this column stores dates/times
IsIntegerColumn()
This action detects whether this column ultimately stores integers inside of it. This type of information is implementation dependent, as arbitrary columns can store these values however they see fit.
Return
boolean: true if this column stores integers
IsNumberColumn()
Return
boolean
IsResultCheckable(Libraries.Language.Compile.Interpreter.Result value)
Returns whether or not the result is checkable inside sub-types.This action generally should not be used.
Parameters
- Libraries.Language.Compile.Interpreter.Result: The Libraries.Language.Compile.Interpreter.Result to check
Return
boolean: whether or not it is valid
IsTextColumn()
This action detects whether this column ultimately stores text inside of it. This type of information is implementation dependent, as arbitrary columns can store these values however they see fit.
Return
boolean: true if this column stores text
IsUndefined()
This action returns a boolean on if the column is undefined.
Return
boolean: true if the undefined size is equal to the size. Meaning every row is undefined.
IsUndefined(integer row)
Parameters
- integer row
Return
boolean
Move(integer left, integer right)
Parameters
- integer left
- integer right
ReplaceUndefined(text value)
By default, this replaces all undefined values with the number value of the text passed in. If the text passed in is not a number, then this call is ignored
Parameters
- text value: the value to be converted.
SendValueTo(integer index, Libraries.Compute.Statistics.DataFrameColumnCalculation calculation)
Parameters
SetAsBoolean(integer index, boolean value)
This action sets the index to a boolean if and only if this is a boolean column. Attrribute: Parameter index the item to be converted
Parameters
- integer index
- boolean value: the value to be placed in the column
SetAsInteger(integer index, integer value)
Parameters
- integer index
- integer value
SetAsNumber(integer index, Libraries.Language.Types.Number value)
Parameters
- integer index
- Libraries.Language.Types.Number
SetAsNumber(integer index, number value)
Parameters
- integer index
- number value
SetAsResult(integer index, Libraries.Language.Compile.Interpreter.Result value)
Parameters
- integer index
- Libraries.Language.Compile.Interpreter.Result
SetAsText(integer index, text value)
This action sets the index to text if and only if this is a text column. Attrribute: Parameter index the item to be converted
Parameters
- integer index
- text value: the value to be placed in the column
SetHeader(text header)
This sets the header for this column.
Parameters
- text header
SetSize(integer size)
Parameters
- integer size
SetSortComparison(Libraries.Containers.Support.Comparison comparison)
We can manually set a comparison, which is then passed to the default sorting routines if sorting occurs.
Parameters
SplitByRows(Libraries.Containers.Array<integer> sortedArray)
This action takes an index sorted array and splits the column into two columns, returning copies. The first one contains all of the items from the indexes in the array. The second one is the items that were not in the array.
Parameters
Return
Subtract(Libraries.Compute.Statistics.Columns.NumberColumn column)
Swap(integer left, integer right)
Parameters
- integer left
- integer right
ToText()
Return
text
On this page
Variables TableAction Documentation- Add(number value)
- Add(text value)
- AddAsResult(Libraries.Language.Compile.Interpreter.Result value)
- Calculate(Libraries.Compute.Statistics.DataFrameColumnCalculation calculation)
- CalculateValueCount()
- CalculateValueCountAsText()
- CanConvertToVector()
- Compare(boolean a, boolean b)
- Compare(Libraries.Language.Object object)
- Compare(number a, number b)
- Compare(integer a, integer b)
- Compare(Libraries.Language.Object a, Libraries.Language.Object b)
- ConvertToBooleanColumn()
- ConvertToIntegerColumn()
- ConvertToNumberColumn()
- ConvertToTextArray()
- ConvertToTextColumn()
- ConvertToVector()
- Copy(integer rowStart, integer rowEnd, boolean sort, boolean unique)
- Copy()
- Copy(boolean sort, boolean unique)
- Copy(integer rowStart, integer rowEnd)
- CopyEmpty()
- CopyToRow(Libraries.Compute.Statistics.DataFrameColumn column, integer to, integer from)
- Equals(Libraries.Language.Object object)
- Get(integer row)
- GetAsBoolean(integer index)
- GetAsDateTime(integer index)
- GetAsInteger(integer index)
- GetAsNumber(integer index)
- GetAsText(integer index)
- GetHashCode()
- GetHeader()
- GetSize()
- GetSortComparison()
- GetUndefinedSize()
- GetUndefinedText()
- GetUnique()
- IsBooleanColumn()
- IsDateTimeColumn()
- IsIntegerColumn()
- IsNumberColumn()
- IsResultCheckable(Libraries.Language.Compile.Interpreter.Result value)
- IsTextColumn()
- IsUndefined()
- IsUndefined(integer row)
- Move(integer left, integer right)
- ReplaceUndefined(text value)
- SendValueTo(integer index, Libraries.Compute.Statistics.DataFrameColumnCalculation calculation)
- SetAsBoolean(integer index, boolean value)
- SetAsInteger(integer index, integer value)
- SetAsNumber(integer index, Libraries.Language.Types.Number value)
- SetAsNumber(integer index, number value)
- SetAsResult(integer index, Libraries.Language.Compile.Interpreter.Result value)
- SetAsText(integer index, text value)
- SetHeader(text header)
- SetSize(integer size)
- SetSortComparison(Libraries.Containers.Support.Comparison comparison)
- SplitByRows(Libraries.Containers.Array
sortedArray) - Subtract(Libraries.Compute.Statistics.Columns.NumberColumn column)
- Swap(integer left, integer right)
- ToText()