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

Class: Math_Numerical_RootFinding

Source Location: /Math_Numerical_RootFinding-0.1.0/Math/Numerical/RootFinding.php

Class Overview


This class provide common numerical analysis root finding methods calculation.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 48]
This class provide common numerical analysis root finding methods calculation.
  • Author: Firman Wandayandi <fwd@vfemail.net>
  • Example: example not found
  • Example: example not found
  • Example: example not found
  • Example: example not found
  • Example: example not found
  • Example: example not found
  • Example: example not found


[ Top ]


Class Variables

$options = array(
            'maxIteration'    => 30,
            'stopOnDivergent' => true,
            'tolerance'       => 1E-005
    )

[line 56]

Options for this object
  • Access: public

Type:   array


[ Top ]



Method Detail

Math_Numerical_RootFinding (Constructor)   [line 103]

Math_Numerical_RootFinding Math_Numerical_RootFinding( [array $options = null])

Constructor
  • Access: public

Parameters:

array   $options   —  optional Options known options:
      maxIteration    int    Number of maximum iteration
      stopOnDivergen  bool   Flag to tell the whether to stop iteration if
                             divergent row detected
      tolerance       float  Error tolerance

[ Top ]

bisection   [line 151]

float|PEAR_Error bisection( string $fx_func, float $a, float $b)

Bisection method
  • Return: root value on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $fx_func   —  f(x) equation function or object/method tuple
float   $a   —  First initial guest
float   $b   —  Second initial guest

[ Top ]

falsePosition   [line 207]

float|PEAR_Error falsePosition( string $fx_func, float $a, float $b)

False Position method
  • Return: root value on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $fx_func   —  f(x) equation function or object/method tuple
float   $a   —  First initial guest
float   $b   —  Second initial guest

[ Top ]

fixedPoint   [line 278]

float|PEAR_Error fixedPoint( string $gx_func, float $x0)

Fixed Point method.
  • Return: root value on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $gx_func   —  g(x) equation function or object/method tuple, which g(x)=x
float   $x0   —  Initial guess

[ Top ]

getIterationCount   [line 484]

int getIterationCount( )

Get iteration count number
  • Return: Iteration count number
  • Access: public

[ Top ]

getRoot   [line 499]

float getRoot( )

Get root value

Alias of root finding method functions

  • Return: Root value
  • Access: public

[ Top ]

getRootList   [line 512]

array getRootList( )

Get all roots found during iteration
  • Return: Root iteration
  • Access: public

[ Top ]

isDivergentRow   [line 465]

bool isDivergentRow( array $epsilonErrors)

Detect for divergent row
  • Return: TRUE if divergent, otherwise FALSE
  • Access: public

Parameters:

array   $epsilonErrors   —  Epsilon errors collection

[ Top ]

newtonRaphson   [line 337]

float|PEAR_Error newtonRaphson( string $fx_func, string $dfx_func, float $x0)

Netwon-Raphson method
  • Return: root value on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $fx_func   —  f(x) equation function or object/method tuple
string   $dfx_func   —  f'(x) equation function or object/method tuple
float   $x0   —  Initial guess

[ Top ]

secant   [line 405]

float|PEAR_Error secant( string $fx_func, float $x0, float $x1)

Secant method
  • Return: root value on success, PEAR_Error on failure
  • Access: public

Parameters:

string   $fx_func   —  f(x) equation function or object/method tuple
float   $x0   —  First initial guest
float   $x1   —  Second initial guest

[ Top ]

set   [line 123]

bool|PEAR_Error set( mixed $option, [mixed $value = null])

Set the option(s)

Set a single or multiple options

  • Return: TRUE on success, PEAR_Error on failure
  • Access: public

Parameters:

mixed   $option   —  A single option name or the options array
mixed   $value   —  Option value if $option is string

[ Top ]


Documentation generated on Mon, 11 Mar 2019 10:14:59 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.