Class de.aitools.js.Vector

Representation of a vector
Defined in: Vector.js.

Class Summary
Constructor Attributes Constructor Name and Description

A data-structure that representes a mathematical vector with a set of essential functions to handle some vector instances.
Method Summary
Method Attributes Method Name and Description

Add the given de.aitools.js.Vector to this one

Returns a duplicate of this de.aitools.js.Vector
<static>
de.aitools.js.Vector.computeCentroid(vectorArr)
Computes the centroid over all given de.aitools.js.Vector instances

equals(vector)
Compares this instance with the given de.aitools.js.Vector and returns the result

Get the deminsion of this de.aitools.js.Vector

Get the number of Elementens within this de.aitools.js.Vector

Get a array of all the indices of this de.aitools.js.Vector
<static>
de.aitools.js.Vector.getMaxDimension(vectorArr)
Computes the highest dimension of over all given de.aitools.js.Vector instances

getValue(index)
Get the value at the specified index

Get an array of all values within this de.aitools.js.Vector

Returns the normalized state of this de.aitools.js.Vector

multiply(vector)
Multiplies this and the given de.aitools.js.Vector and stores the results within this one

Normalizes this de.aitools.js.Vector

scalarProduct(vector)
Computes and returns the scalar product between this and the given de.aitools.js.Vector

scale(factor)
Scales each component according to the specified factor

setDimension(dimension)
Set the dimension of this de.aitools.js.Vector

setValue(index, value)
Set a value at a specific index in this de.aitools.js.Vector
Class Detail
de.aitools.js.Vector()
A data-structure that representes a mathematical vector with a set of essential functions to handle some vector instances.
Author: Alexander Kümmel [email protected], Christof Bräutigam [email protected].
Method Detail
Add the given de.aitools.js.Vector to this one
Parameters:
vector
A de.aitools.js.Vector instance

clone()
Returns a duplicate of this de.aitools.js.Vector
Returns:
Cloned vector

<static> de.aitools.js.Vector.computeCentroid(vectorArr)
Computes the centroid over all given de.aitools.js.Vector instances
Parameters:
{Array} vectorArr
Array of de.aitools.js.Vector instances
Returns:

{Boolean} equals(vector)
Compares this instance with the given de.aitools.js.Vector and returns the result
Parameters:
vector
A de.aitools.js.Vector instance
Returns:
{Boolean} True if equals

{Number} getDimension()
Get the deminsion of this de.aitools.js.Vector
Returns:
{Number}

{Number} getElementCount()
Get the number of Elementens within this de.aitools.js.Vector
Returns:
{Number}

{Array} getIndices()
Get a array of all the indices of this de.aitools.js.Vector
Returns:
{Array} Array of numbers

<static> {Number} de.aitools.js.Vector.getMaxDimension(vectorArr)
Computes the highest dimension of over all given de.aitools.js.Vector instances
Parameters:
{Array} vectorArr
Array of de.aitools.js.Vector instances
Returns:
{Number}

{Number} getValue(index)
Get the value at the specified index
Parameters:
{Number} index
Returns:
{Number}

{Array} getValues()
Get an array of all values within this de.aitools.js.Vector
Returns:
{Array} Array of Numbers

{Boolean} isNormalized()
Returns the normalized state of this de.aitools.js.Vector
Returns:

multiply(vector)
Multiplies this and the given de.aitools.js.Vector and stores the results within this one
Parameters:
vector
A de.aitools.js.Vector instance

normalize()
Normalizes this de.aitools.js.Vector

{Number} scalarProduct(vector)
Computes and returns the scalar product between this and the given de.aitools.js.Vector
Parameters:
vector
A de.aitools.js.Vector instance
Returns:
{Number}

scale(factor)
Scales each component according to the specified factor
Parameters:
{Number} factor
Numeric value

setDimension(dimension)
Set the dimension of this de.aitools.js.Vector
Parameters:
{Number} dimension

setValue(index, value)
Set a value at a specific index in this de.aitools.js.Vector
Parameters:
{Number} index
{Number} value

Documentation generated by JsDoc Toolkit 2.4.0 on Wed May 30 2012 16:21:04 GMT+0200 (CEST)