| [ Index ] |
PHP Cross Reference of MantisBT |
[Source view] [Print] [Project Stats]
File containing the abstract ezcGraphPolynom class
| Copyright: | Copyright (C) 2005-2009 eZ Systems AS. All rights reserved. |
| License: | http://ez.no/licenses/new_bsd New BSD License |
| Version: | 1.5 |
| File Size: | 259 lines (6 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
ezcGraphPolynom:: (8 methods):
__construct()
init()
get()
set()
getOrder()
add()
evaluate()
__toString()
Class: ezcGraphPolynom - X-Ref
Provides a class for generic operations on polynoms| __construct( array $values = array() X-Ref |
| Constructor Constructs a polynom object from given array, where the key is the exponent and the value the factor. An example: Polynom: 2 * x^3 + .5 * x - 3 Array: array ( (int) 3 => (float) 2, (int) 1 => (float) .5, (int) 0 => (float) -3, ) param: array $values Array with values return: ezcGraphPolynom |
| init( $order ) X-Ref |
| Initialise a polygon Initialise a polygon of the given order. Sets all factors to 0. param: int $order Order of polygon return: ezcGraphPolynom Created polynom |
| get( $exponent ) X-Ref |
| Return factor for one exponent param: int $exponent Exponent return: float Factor |
| set( $exponent, $factor ) X-Ref |
| Set the factor for one exponent param: int $exponent Exponent param: float $factor Factor return: ezcGraphPolynom Modified polynom |
| getOrder() X-Ref |
| Returns the order of the polynom return: int Polynom order |
| add( ezcGraphPolynom $polynom ) X-Ref |
| Adds polynom to current polynom param: ezcGraphPolynom $polynom Polynom to add return: ezcGraphPolynom Modified polynom |
| evaluate( $x ) X-Ref |
| Evaluate Polynom with a given value param: float $x Value return: float Result |
| __toString() X-Ref |
| Returns a string represenation of the polynom return: string String representation of polynom |
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |