Class Vector

Description

Describes vector.

Located in /gd2imaging.php (line 230)


	
			
Variable Summary
double[] $components
mixed $identifier
int $length
Method Summary
Vector __construct (int $dimension, [mixed $identifier = -1], [double[] $components = null])
Vector add (Vector $v)
Vector addNoise (int $level)
bool equals (Vector $v)
int getDimensions ()
mixed getIdentifier ()
void getLength ()
double getValue (int $i)
Vector multiply (mixed $v)
void setIdentifier (string $name)
void sum ()
double[] toArray ()
Variables
double[] $components = array() (line 237)

An array of components of this vector.

  • access: protected
int $dimension (line 244)

A dimension of this vector.

  • access: protected
mixed $identifier = -1 (line 251)

An identifier of this vector.

  • access: protected
int $length = null (line 258)

A length of this vector.

  • access: protected
Methods
Constructor __construct (line 268)

Creates new vector.

  • access: public
Vector __construct (int $dimension, [mixed $identifier = -1], [double[] $components = null])
  • int $dimension: Dimension of this vector.
  • mixed $identifier: Identifier of this vector.
  • double[] $components: Components of this vector.
add (line 346)

Adds two vectors.

  • access: public
Vector add (Vector $v)
addNoise (line 280)

Adds noise to this vector.

  • access: public
Vector addNoise (int $level)
  • int $level: Noise level.
equals (line 429)

Compares two vectors.

  • return: True if vectors are equal, false otherwise.
  • access: public
bool equals (Vector $v)
getCopy (line 493)

Returns copy of this vector.

  • access: public
Vector getCopy ()
getDimensions (line 294)

Returns the dimension of this vector.

  • access: public
int getDimensions ()
getIdentifier (line 303)

Returns the identifier of this vector.

  • access: public
mixed getIdentifier ()
getLength (line 466)
  • access: public
void getLength ()
getValue (line 332)

Returns a component of this vector.

  • return: Value of the selected component.
  • access: public
double getValue (int $i)
  • int $i: Index of the component.
multiply (line 366)

Multiplies two vectors or by a given scalar value.

  • access: public
Vector multiply (mixed $v)
  • mixed $v: A vector or scalar value to multiply.
negate (line 393)

Negates this vector.

  • access: public
Vector negate ()
normalize (line 447)

Performs Vector normalization.

  • access: public
Vector normalize ()
setIdentifier (line 313)

Sets the identifier of this vector.

  • access: public
void setIdentifier (string $name)
  • string $name
substract (line 409)

Adds two vectors.

  • access: public
Vector substract (Vector $v)
sum (line 484)
  • access: public
void sum ()
toArray (line 322)

Returns components of this vector.

  • access: public
double[] toArray ()

Documentation generated on Fri, 04 Nov 2011 17:56:15 +0100 by phpDocumentor 1.4.2