Math_Vector
[ class tree: Math_Vector ] [ index: Math_Vector ] [ all elements ]

Class: Math_Tuple

Source Location: /Math_Vector-0.7.0/Math/Tuple.php

Class Overview


General Tuple class A Tuple represents a general unidimensional list of n numeric elements Originally this class was part of NumPHP (Numeric PHP package)


Author(s):

Version:

  • 1.0

Methods


Inherited Variables

Inherited Methods


Class Details

[line 34]
General Tuple class A Tuple represents a general unidimensional list of n numeric elements Originally this class was part of NumPHP (Numeric PHP package)


[ Top ]


Method Detail

Math_Tuple (Constructor)   [line 51]

object Math_Tuple Math_Tuple( array $data)

Constructor of Math_Tuple
  • Return: (or PEAR_Error on error)
  • Access: public

Parameters:

array   $data   —  array of numbers

[ Top ]

addElement   [line 107]

mixed addElement( numeric $elvalue)

Appends an element to the tuple
  • Return: index of appended element on success, PEAR_Error object otherwise
  • Access: public

Parameters:

numeric   $elvalue   —  element value

[ Top ]

delElement   [line 123]

mixed delElement( integer $elindex)

Remove an element from the tuple
  • Return: true on success, PEAR_Error object otherwise
  • Access: public

Parameters:

integer   $elindex   —  element index

[ Top ]

getData   [line 154]

$array getData( )

Returns an array with all the elements of the tuple
  • Access: public

[ Top ]

getElement   [line 140]

mixed getElement( integer $elindex)

Returns the value of an element in the tuple
  • Return: numeric on success, PEAR_Error otherwise
  • Access: public

Parameters:

integer   $elindex   —  element index

[ Top ]

getMax   [line 177]

numeric getMax( )

Returns the maximum value of the tuple
  • Access: public

[ Top ]

getMaxIndex   [line 225]

integer getMaxIndex( )

Gets the position of the maximum value in the tuple
  • Access: public

[ Top ]

getMin   [line 166]

numeric getMin( )

Returns the minimum value of the tuple
  • Access: public

[ Top ]

getMinIndex   [line 214]

integer getMinIndex( )

Gets the position of the minimum value in the tuple
  • Access: public

[ Top ]

getMinMax   [line 188]

array getMinMax( )

Returns an array of the minimum and maximum values of the tuple
  • Return: of the minimum and maximum values
  • Access: public

[ Top ]

getMinMaxIndex   [line 236]

array getMinMaxIndex( )

Gets an array of the positions of the minimum and maximum values in the tuple
  • Return: of integers indexes
  • Access: public

[ Top ]

getSize   [line 78]

integer getSize( )

Returns the size (number of elements) in the tuple
  • Access: public

[ Top ]

getValueIndex   [line 200]

integer getValueIndex( numeric $val)

Gets the position of the given value in the tuple
  • Access: public

Parameters:

numeric   $val   —  value for which the index is requested

[ Top ]

isZero   [line 247]

boolean isZero( )

Checks if the tuple is a a Zero tuple
  • Access: public

[ Top ]

setElement   [line 91]

mixed setElement( integer $elindex, numeric $elvalue)

Sets the value of an element
  • Return: true if successful, PEAR_Error object otherwise
  • Access: public

Parameters:

integer   $elindex   —  element index
numeric   $elvalue   —  element value

[ Top ]

squeezeHoles   [line 67]

void squeezeHoles( )

Squeezes out holes in the tuple sequence
  • Access: public

[ Top ]

toHTML   [line 272]

string toHTML( )

Returns an HTML representation of the tuple
  • Access: public

[ Top ]

toString   [line 261]

string toString( )

Returns an string representation of the tuple
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.