Apache Zeta Components Manual :: Docs For Class ezcGraphDataSetAveragePolynom
Graph::ezcGraphDataSetAveragePolynom
Class ezcGraphDataSetAveragePolynom
Extension of basic dataset to represent averation.
Algorithm: http://en.wikipedia.org/wiki/Least_squares
Source for this file: /Graph/src/datasets/average.php
ezcGraphDataSet | --ezcGraphDataSetAveragePolynom
Version: | //autogentag// |
Properties
int | read/write |
$polynomOrder
Maximum order of polygon to interpolate from points |
int | read/write |
$resolution
Resolution used to draw line in graph |
Member Variables
protected float |
$max
= false
Maximum key |
protected float |
$min
= false
Minimum key |
protected ezcGraphPolynom |
$polynom
= false
Calculated averation polynom |
protected int |
$position
= 0
Position of the data iterator. Depends on the configured resolution. |
protected array(string=>mixed) |
$properties
Container to hold the properties |
protected ezcGraphDataSet |
$source
Source dataset to base averation on. |
Inherited Member Variables
From ezcGraphDataSet | |
---|---|
protected |
ezcGraphDataSet::$current
|
protected |
ezcGraphDataSet::$data
|
protected |
ezcGraphDataSet::$keys
|
protected |
ezcGraphDataSet::$pallet
|
Method Summary
protected void |
buildPolynom(
)
Build the polynom based on the given points. |
public int |
count(
)
Returns the number of elements in this dataset |
public string |
current(
)
Returns the currently selected datapoint. |
protected float |
getKey(
$position
)
Get the x coordinate for the current position |
public ezcGraphPolynom |
getPolynom(
)
Returns a polynom of the defined order witch matches the datapoints using the least squares algorithm. |
public string |
key(
)
Returns the key of the currently selected datapoint. |
public float |
next(
)
Returns the next datapoint and selects it or false on the last datapoint. |
public bool |
offsetExists(
$key
)
Returns true if the given datapoint exists Allows isset() using ArrayAccess. |
public float |
offsetGet(
$key
)
Returns the value for the given datapoint Get an datapoint value by ArrayAccess. |
public void |
offsetSet(
$key
, $value
)
Throws a ezcBasePropertyPermissionException because single datapoints cannot be set in average datasets. |
public float |
rewind(
)
Selects the very first datapoint and returns it. |
public bool |
valid(
)
Returns if the current datapoint is valid. |
public mixed |
__get(
$propertyName
)
Property get access. |
public mixed |
__set(
$propertyName
, $propertyValue
)
Options write access |
Inherited Methods
From ezcGraphDataSet | |
---|---|
public string |
ezcGraphDataSet::current()
Returns the currently selected datapoint. |
public string |
ezcGraphDataSet::key()
Returns the key of the currently selected datapoint. |
public float |
ezcGraphDataSet::next()
Returns the next datapoint and selects it or false on the last datapoint. |
public bool |
ezcGraphDataSet::offsetExists()
Returns true if the given datapoint exists Allows isset() using ArrayAccess. |
public float |
ezcGraphDataSet::offsetGet()
Returns the value for the given datapoint Get an datapoint value by ArrayAccess. |
public void |
ezcGraphDataSet::offsetSet()
Sets the value for a datapoint. |
public void |
ezcGraphDataSet::offsetUnset()
Unset an option. |
public float |
ezcGraphDataSet::rewind()
Selects the very first datapoint and returns it. |
public bool |
ezcGraphDataSet::valid()
Returns if the current datapoint is valid. |
public mixed |
ezcGraphDataSet::__get()
Property get access. |
Methods
buildPolynom
Build the polynom based on the given points.
count
Returns the number of elements in this dataset
current
Returns the currently selected datapoint.
This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::current() |
Returns the currently selected datapoint. |
getKey
Get the x coordinate for the current position
Parameters:
Name | Type | Description |
---|---|---|
$position |
int | Position |
getPolynom
Returns a polynom of the defined order witch matches the datapoints using the least squares algorithm.
key
Returns the key of the currently selected datapoint.
This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::key() |
Returns the key of the currently selected datapoint. |
next
Returns the next datapoint and selects it or false on the last datapoint.
This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::next() |
Returns the next datapoint and selects it or false on the last datapoint. |
offsetExists
Returns true if the given datapoint exists Allows isset() using ArrayAccess.
Parameters:
Name | Type | Description |
---|---|---|
$key |
string | The key of the datapoint to get. |
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::offsetExists() |
Returns true if the given datapoint exists Allows isset() using ArrayAccess. |
offsetGet
Returns the value for the given datapoint Get an datapoint value by ArrayAccess.
Parameters:
Name | Type | Description |
---|---|---|
$key |
string | The key of the datapoint to get. |
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::offsetGet() |
Returns the value for the given datapoint Get an datapoint value by ArrayAccess. |
offsetSet
Throws a ezcBasePropertyPermissionException because single datapoints cannot be set in average datasets.
Parameters:
Name | Type | Description |
---|---|---|
$key |
string | The kex of a datapoint to set. |
$value |
float | The value for the datapoint. |
Exceptions:
Type | Description |
---|---|
ezcBasePropertyPermissionException |
Always, because access is readonly. |
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::offsetSet() |
Sets the value for a datapoint. |
rewind
Selects the very first datapoint and returns it.
This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::rewind() |
Selects the very first datapoint and returns it. |
valid
Returns if the current datapoint is valid.
This method is part of the Iterator interface to allow access to the datapoints of this row by iterating over it like an array (e.g. using foreach).
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::valid() |
Returns if the current datapoint is valid. |
__get
Property get access.
Simply returns a given option.
Parameters:
Name | Type | Description |
---|---|---|
$propertyName |
string | The name of the option to get. |
Exceptions:
Type | Description |
---|---|
ezcBasePropertyNotFoundException |
If a the value for the property options is not an instance of |
Redefinition of:
Method | Description |
---|---|
ezcGraphDataSet::__get() |
Property get access. |
__set
Options write access
Parameters:
Name | Type | Description |
---|---|---|
$propertyName |
mixed | Option name |
$propertyValue |
mixed | Option value; |
Exceptions:
Type | Description |
---|---|
ezcBaseValueException |
If value is out of range |
ezcBasePropertyNotFoundException |
If Option could not be found |