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

Class: Math_PolynomialTerm

Source Location: /Math_Polynomial-0.1.0/Polynomial/PolynomialTerm.php

Class Overview


Class representing a term of a Polynomial


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 28]
Class representing a term of a Polynomial

Represents a polynomial term of the form: Cx^E where C is a constant (float), and E is an exponent (int)



[ Top ]


Class Variables

$_coef =

[line 36]

The coefficient of the term
  • Access: protected

Type:   float


[ Top ]

$_exp =

[line 44]

The exponent of the term
  • Access: protected

Type:   integer


[ Top ]



Method Detail

Math_PolynomialTerm (Constructor)   [line 54]

Math_PolynomialTerm Math_PolynomialTerm( [float $flt_coef = 0.0], [integer $int_exp = 0])

Construct a polynomial term object
  • Access: public

Parameters:

float   $flt_coef   — 
integer   $int_exp   — 

[ Top ]

getCoefficient   [line 79]

float getCoefficient( )

Get the coefficient from the Polynomial Term
  • Access: public

[ Top ]

getExponent   [line 67]

integer getExponent( )

Get the exponent from the Polynomial Term
  • Access: public

[ Top ]

setCoefficient   [line 105]

void setCoefficient( float $flt_coef)

Set the coefficient of the term
  • Access: public

Parameters:

float   $flt_coef   — 

[ Top ]

setExponent   [line 92]

void setExponent( integer $int_exp)

Set the exponent of the term
  • Access: public

Parameters:

integer   $int_exp   — 

[ Top ]

toString   [line 117]

string toString( )

Get a string representation of just this term
  • Access: public

[ Top ]


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