Class

SymbolicFloat32Array

Typed array used for input and output variables of DescriptorRunner. You can use SymbolicFloat32Array almost as same as Float32Array.

To convert SymbolicFloat32Array into actual Float32Array, use toActual()


let result = runner.outputs[0];  //runner.outputs is array of SymbolicFloat32Array

// SymbolicFloat32Array does NOT support index access
console.log(result[0]);
>>> undefined

// By conversion, you can access each element by index
console.log(result.toActual()[0]);
>>> 1.00  // Actual result
Inheritance hierarchy
Properties
# BYTES_PER_ELEMENT: number = 4 [symbolic_typed_array/symbolic_float32array.ts:41]

The size in bytes of each element in the array.

# BYTES_PER_ELEMENT: number = 4 [symbolic_typed_array/symbolic_float32array.ts:36]

The size in bytes of each element in SymbolicFloat32Array.

Accessors
# get buffer(): ArrayBufferLike [symbolic_typed_array/symbolic_typed_array.ts:87] set buffer(buffer: ArrayBufferLike ): void [symbolic_typed_array/symbolic_typed_array.ts:95]

The ArrayBuffer instance referenced by the array.

Returns
ArrayBufferLike

The ArrayBuffer instance referenced by the array.

Parameters
Name Type Default Description
buffer ArrayBufferLike
Returns
void

The length in bytes of the array.

Returns
number

The offset in bytes of the array.

Returns
any

The number of elements in this buffer. Actual byte size is (length * SIZE_OF_FLOAT).

Returns
number

The number in this buffer. Actual offset size is (offset * SIZE_OF_FLOAT).

Returns
number
Methods
#

copyWithin

copyWithin(target: number , start: number , end?: number ): this [symbolic_typed_array/symbolic_typed_array.ts:153]

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

Parameters
Name Type Default Description
target number

If target is negative, it is treated as length+target where length is the length of the array.

start number

If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

end number

If not specified, length of the this object is used as its default value.

Returns
this
#

entries

entries(): IterableIterator<[number , number ] > [symbolic_typed_array/symbolic_typed_array.ts:245]

Returns an iterable of key, value pairs for every entry in the array

Returns
IterableIterator<[number , number ] >
#

every

every(callbackfn: function , thisArg?: any ): boolean [symbolic_typed_array/symbolic_float32array.ts:63]

Determines whether all the members of an array satisfy the specified test.

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.

thisArg any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns
boolean
#

fill

fill(value: number , start?: number , end?: number ): this [symbolic_typed_array/symbolic_typed_array.ts:166]

Returns the this object after filling the section identified by start and end with value

Parameters
Name Type Default Description
value number

value to fill array section with

start number

index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.

end number

index to stop filling the array at. If end is negative, it is treated as length+end.

Returns
this
#

filter

filter(callbackfn: function , thisArg?: any ): Float32Array [symbolic_typed_array/symbolic_float32array.ts:74]

Returns the elements of an array that meet the condition specified in a callback function.

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.

thisArg any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns
Float32Array
#

find

find(predicate: function , thisArg?: any ): number | undefined [symbolic_typed_array/symbolic_float32array.ts:87]

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

Parameters
Name Type Default Description
predicate function

find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

thisArg any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

Returns
number | undefined
#

findIndex

findIndex(predicate: function , thisArg?: any ): number [symbolic_typed_array/symbolic_float32array.ts:100]

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

Parameters
Name Type Default Description
predicate function

find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.

thisArg any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

Returns
number
#

forEach

forEach(callbackfn: function , thisArg?: any ): void [symbolic_typed_array/symbolic_float32array.ts:111]

Performs the specified action for each element in an array.

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

thisArg any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns
void
#

indexOf

indexOf(searchElement: number , fromIndex?: number ): number [symbolic_typed_array/symbolic_typed_array.ts:177]

Returns the index of the first occurrence of a value in an array.

Parameters
Name Type Default Description
searchElement number

The value to locate in the array.

fromIndex number

The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

Returns
number
#

join

join(separator?: string ): string [symbolic_typed_array/symbolic_typed_array.ts:186]

Adds all the elements of an array separated by the specified separator string.

Parameters
Name Type Default Description
separator string

A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

Returns
string
#

keys

keys(): IterableIterator<number > [symbolic_typed_array/symbolic_typed_array.ts:252]

Returns an iterable of keys in the array

Returns
IterableIterator<number >
#

lastIndexOf

lastIndexOf(searchElement: number , fromIndex?: number ): number [symbolic_typed_array/symbolic_typed_array.ts:196]

Returns the index of the last occurrence of a value in an array.

Parameters
Name Type Default Description
searchElement number

The value to locate in the array.

fromIndex number

The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

Returns
number
#

map

map(callbackfn: function , thisArg?: any ): Float32Array [symbolic_typed_array/symbolic_float32array.ts:123]

Calls a defined callback function on each element of an array, and returns an array that contains the results.

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

thisArg any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns
Float32Array
#

reduce

reduce(callbackfn: function ): number [symbolic_typed_array/symbolic_float32array.ts:137]
reduce(callbackfn: function , initialValue: number ): number [symbolic_typed_array/symbolic_float32array.ts:138]
reduce<U>(callbackfn: function , initialValue: U ): U [symbolic_typed_array/symbolic_float32array.ts:150]

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

Returns
number
Parameters
Name Type Default Description
callbackfn function
initialValue number
Returns
number

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Type Parameters
  • U

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

initialValue U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns
U
#

reduceRight

reduceRight(callbackfn: function ): number [symbolic_typed_array/symbolic_float32array.ts:165]
reduceRight(callbackfn: function , initialValue: number ): number [symbolic_typed_array/symbolic_float32array.ts:166]
reduceRight<U>(callbackfn: function , initialValue: U ): U [symbolic_typed_array/symbolic_float32array.ts:178]

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

Returns
number
Parameters
Name Type Default Description
callbackfn function
initialValue number
Returns
number

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

Type Parameters
  • U

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

initialValue U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

Returns
U
#

reverse

Reverses the elements in an Array.

Returns
Float32Array
#

set

set(array: ArrayLike<number > , offset?: number | undefined ): void [symbolic_typed_array/symbolic_typed_array.ts:219]

Sets a value or an array of values.

Parameters
Name Type Default Description
array ArrayLike<number >

A typed or untyped array of values to set.

offset number | undefined

The index in the current array at which the values are to be written.

Returns
void
#

slice

slice(start?: number , end?: number ): Float32Array [symbolic_typed_array/symbolic_float32array.ts:195]

Returns a section of an array.

Parameters
Name Type Default Description
start number

The beginning of the specified portion of the array.

end number

The end of the specified portion of the array.

Returns
Float32Array
#

some

some(callbackfn: function , thisArg?: any ): boolean [symbolic_typed_array/symbolic_float32array.ts:207]

Determines whether the specified callback function returns true for any element of an array.

Parameters
Name Type Default Description
callbackfn function

A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.

thisArg any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Returns
boolean
#

sort

sort(compareFn?: function ): this [symbolic_typed_array/symbolic_typed_array.ts:205]

Sorts an array.

Parameters
Name Type Default Description
compareFn function

The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.

Returns
this
#

subarray

subarray(begin: number , end?: number ): Float32Array [symbolic_typed_array/symbolic_float32array.ts:217]

Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.

Parameters
Name Type Default Description
begin number

The index of the beginning of the array.

end number

The index of the end of the array.

Returns
Float32Array
#

toActual

Convert SymbolicTypedArray instance into actual TypedArray instance.

Returns
Float32Array

actual typed array

#

toLocaleString

Converts a number to a string by using the current locale.

Returns
string
#

Returns a string representation of an array.

Returns
string
#

values

values(): IterableIterator<number > [symbolic_typed_array/symbolic_typed_array.ts:259]

Returns an iterable of values in the array

Returns
IterableIterator<number >