parent
4f1fae5298
commit
a504a39474
|
@ -2018,12 +2018,9 @@ class Financial
|
||||||
*
|
*
|
||||||
* Returns the straight-line depreciation of an asset for one period
|
* Returns the straight-line depreciation of an asset for one period
|
||||||
*
|
*
|
||||||
* @param cost Initial cost of the asset
|
* @param mixed $cost Initial cost of the asset
|
||||||
* @param salvage Value at the end of the depreciation
|
* @param mixed $salvage Value at the end of the depreciation
|
||||||
* @param life Number of periods over which the asset is depreciated
|
* @param mixed $life Number of periods over which the asset is depreciated
|
||||||
* @param mixed $cost
|
|
||||||
* @param mixed $salvage
|
|
||||||
* @param mixed $life
|
|
||||||
*
|
*
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
|
@ -2050,14 +2047,10 @@ class Financial
|
||||||
*
|
*
|
||||||
* Returns the sum-of-years' digits depreciation of an asset for a specified period.
|
* Returns the sum-of-years' digits depreciation of an asset for a specified period.
|
||||||
*
|
*
|
||||||
* @param cost Initial cost of the asset
|
* @param mixed $cost Initial cost of the asset
|
||||||
* @param salvage Value at the end of the depreciation
|
* @param mixed $salvage Value at the end of the depreciation
|
||||||
* @param life Number of periods over which the asset is depreciated
|
* @param mixed $life Number of periods over which the asset is depreciated
|
||||||
* @param period Period
|
* @param mixed $period Period
|
||||||
* @param mixed $cost
|
|
||||||
* @param mixed $salvage
|
|
||||||
* @param mixed $life
|
|
||||||
* @param mixed $period
|
|
||||||
*
|
*
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -473,8 +473,7 @@ class Functions
|
||||||
*
|
*
|
||||||
* Returns a value converted to a number
|
* Returns a value converted to a number
|
||||||
*
|
*
|
||||||
* @param value The value you want converted
|
* @param null|mixed $value The value you want converted
|
||||||
* @param null|mixed $value
|
|
||||||
*
|
*
|
||||||
* @return number N converts values listed in the following table
|
* @return number N converts values listed in the following table
|
||||||
* If value is or refers to N returns
|
* If value is or refers to N returns
|
||||||
|
@ -515,8 +514,7 @@ class Functions
|
||||||
*
|
*
|
||||||
* Returns a number that identifies the type of a value
|
* Returns a number that identifies the type of a value
|
||||||
*
|
*
|
||||||
* @param value The value you want tested
|
* @param null|mixed $value The value you want tested
|
||||||
* @param null|mixed $value
|
|
||||||
*
|
*
|
||||||
* @return number N converts values listed in the following table
|
* @return number N converts values listed in the following table
|
||||||
* If value is or refers to N returns
|
* If value is or refers to N returns
|
||||||
|
|
|
@ -15,22 +15,17 @@ class LookupRef
|
||||||
* Excel Function:
|
* Excel Function:
|
||||||
* =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])
|
* =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])
|
||||||
*
|
*
|
||||||
* @param row Row number to use in the cell reference
|
* @param mixed $row Row number to use in the cell reference
|
||||||
* @param column Column number to use in the cell reference
|
* @param mixed $column Column number to use in the cell reference
|
||||||
* @param relativity Flag indicating the type of reference to return
|
* @param int $relativity Flag indicating the type of reference to return
|
||||||
* 1 or omitted Absolute
|
* 1 or omitted Absolute
|
||||||
* 2 Absolute row; relative column
|
* 2 Absolute row; relative column
|
||||||
* 3 Relative row; absolute column
|
* 3 Relative row; absolute column
|
||||||
* 4 Relative
|
* 4 Relative
|
||||||
* @param referenceStyle A logical value that specifies the A1 or R1C1 reference style.
|
* @param bool $referenceStyle A logical value that specifies the A1 or R1C1 reference style.
|
||||||
* TRUE or omitted CELL_ADDRESS returns an A1-style reference
|
* TRUE or omitted CELL_ADDRESS returns an A1-style reference
|
||||||
* FALSE CELL_ADDRESS returns an R1C1-style reference
|
* FALSE CELL_ADDRESS returns an R1C1-style reference
|
||||||
* @param sheetText Optional Name of worksheet to use
|
* @param string $sheetText Optional Name of worksheet to use
|
||||||
* @param mixed $row
|
|
||||||
* @param mixed $column
|
|
||||||
* @param mixed $relativity
|
|
||||||
* @param mixed $referenceStyle
|
|
||||||
* @param mixed $sheetText
|
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -84,10 +79,9 @@ class LookupRef
|
||||||
* Excel Function:
|
* Excel Function:
|
||||||
* =COLUMN([cellAddress])
|
* =COLUMN([cellAddress])
|
||||||
*
|
*
|
||||||
* @param cellAddress A reference to a range of cells for which you want the column numbers
|
* @param null|array|string $cellAddress A reference to a range of cells for which you want the column numbers
|
||||||
* @param null|mixed $cellAddress
|
|
||||||
*
|
*
|
||||||
* @return int or array of integer
|
* @return int|int[]
|
||||||
*/
|
*/
|
||||||
public static function COLUMN($cellAddress = null)
|
public static function COLUMN($cellAddress = null)
|
||||||
{
|
{
|
||||||
|
@ -130,8 +124,7 @@ class LookupRef
|
||||||
* Excel Function:
|
* Excel Function:
|
||||||
* =COLUMNS(cellAddress)
|
* =COLUMNS(cellAddress)
|
||||||
*
|
*
|
||||||
* @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns
|
* @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns
|
||||||
* @param null|mixed $cellAddress
|
|
||||||
*
|
*
|
||||||
* @return int The number of columns in cellAddress
|
* @return int The number of columns in cellAddress
|
||||||
*/
|
*/
|
||||||
|
@ -165,8 +158,7 @@ class LookupRef
|
||||||
* Excel Function:
|
* Excel Function:
|
||||||
* =ROW([cellAddress])
|
* =ROW([cellAddress])
|
||||||
*
|
*
|
||||||
* @param cellAddress A reference to a range of cells for which you want the row numbers
|
* @param null|array|string $cellAddress A reference to a range of cells for which you want the row numbers
|
||||||
* @param null|mixed $cellAddress
|
|
||||||
*
|
*
|
||||||
* @return int or array of integer
|
* @return int or array of integer
|
||||||
*/
|
*/
|
||||||
|
@ -211,7 +203,7 @@ class LookupRef
|
||||||
* Excel Function:
|
* Excel Function:
|
||||||
* =ROWS(cellAddress)
|
* =ROWS(cellAddress)
|
||||||
*
|
*
|
||||||
* @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows
|
* @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows
|
||||||
* @param null|mixed $cellAddress
|
* @param null|mixed $cellAddress
|
||||||
*
|
*
|
||||||
* @return int The number of rows in cellAddress
|
* @return int The number of rows in cellAddress
|
||||||
|
@ -279,7 +271,7 @@ class LookupRef
|
||||||
*
|
*
|
||||||
* NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010
|
* NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010
|
||||||
*
|
*
|
||||||
* @param cellAddress $cellAddress The cell address of the current cell (containing this formula)
|
* @param null|array|string $cellAddress $cellAddress The cell address of the current cell (containing this formula)
|
||||||
* @param Cell $pCell The current cell (containing this formula)
|
* @param Cell $pCell The current cell (containing this formula)
|
||||||
*
|
*
|
||||||
* @return mixed The cells referenced by cellAddress
|
* @return mixed The cells referenced by cellAddress
|
||||||
|
@ -337,25 +329,20 @@ class LookupRef
|
||||||
* Excel Function:
|
* Excel Function:
|
||||||
* =OFFSET(cellAddress, rows, cols, [height], [width])
|
* =OFFSET(cellAddress, rows, cols, [height], [width])
|
||||||
*
|
*
|
||||||
* @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or
|
* @param null|array|string $cellAddress The reference from which you want to base the offset. Reference must refer to a cell or
|
||||||
* range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
|
* range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
|
||||||
* @param rows The number of rows, up or down, that you want the upper-left cell to refer to.
|
* @param mixed $rows The number of rows, up or down, that you want the upper-left cell to refer to.
|
||||||
* Using 5 as the rows argument specifies that the upper-left cell in the reference is
|
* Using 5 as the rows argument specifies that the upper-left cell in the reference is
|
||||||
* five rows below reference. Rows can be positive (which means below the starting reference)
|
* five rows below reference. Rows can be positive (which means below the starting reference)
|
||||||
* or negative (which means above the starting reference).
|
* or negative (which means above the starting reference).
|
||||||
* @param cols The number of columns, to the left or right, that you want the upper-left cell of the result
|
* @param mixed $columns The number of columns, to the left or right, that you want the upper-left cell of the result
|
||||||
* to refer to. Using 5 as the cols argument specifies that the upper-left cell in the
|
* to refer to. Using 5 as the cols argument specifies that the upper-left cell in the
|
||||||
* reference is five columns to the right of reference. Cols can be positive (which means
|
* reference is five columns to the right of reference. Cols can be positive (which means
|
||||||
* to the right of the starting reference) or negative (which means to the left of the
|
* to the right of the starting reference) or negative (which means to the left of the
|
||||||
* starting reference).
|
* starting reference).
|
||||||
* @param height The height, in number of rows, that you want the returned reference to be. Height must be a positive number.
|
* @param mixed $height The height, in number of rows, that you want the returned reference to be. Height must be a positive number.
|
||||||
* @param width The width, in number of columns, that you want the returned reference to be. Width must be a positive number.
|
* @param mixed $width The width, in number of columns, that you want the returned reference to be. Width must be a positive number.
|
||||||
* @param null|mixed $cellAddress
|
* @param null|Cell $pCell
|
||||||
* @param mixed $rows
|
|
||||||
* @param mixed $columns
|
|
||||||
* @param null|mixed $height
|
|
||||||
* @param null|mixed $width
|
|
||||||
* @param Cell $pCell
|
|
||||||
*
|
*
|
||||||
* @return string A reference to a cell or range of cells
|
* @return string A reference to a cell or range of cells
|
||||||
*/
|
*/
|
||||||
|
@ -435,10 +422,10 @@ class LookupRef
|
||||||
* Excel Function:
|
* Excel Function:
|
||||||
* =CHOOSE(index_num, value1, [value2], ...)
|
* =CHOOSE(index_num, value1, [value2], ...)
|
||||||
*
|
*
|
||||||
* @param index_num Specifies which value argument is selected.
|
* @param mixed $index_num Specifies which value argument is selected.
|
||||||
* Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number
|
* Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number
|
||||||
* between 1 and 254.
|
* between 1 and 254.
|
||||||
* @param value1... Value1 is required, subsequent values are optional.
|
* @param mixed $value1... Value1 is required, subsequent values are optional.
|
||||||
* Between 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on
|
* Between 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on
|
||||||
* index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or
|
* index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or
|
||||||
* text.
|
* text.
|
||||||
|
@ -590,12 +577,9 @@ class LookupRef
|
||||||
* Excel Function:
|
* Excel Function:
|
||||||
* =INDEX(range_array, row_num, [column_num])
|
* =INDEX(range_array, row_num, [column_num])
|
||||||
*
|
*
|
||||||
* @param range_array A range of cells or an array constant
|
* @param mixed $arrayValues A range of cells or an array constant
|
||||||
* @param row_num The row in array from which to return a value. If row_num is omitted, column_num is required.
|
* @param mixed $rowNum The row in array from which to return a value. If row_num is omitted, column_num is required.
|
||||||
* @param column_num The column in array from which to return a value. If column_num is omitted, row_num is required.
|
* @param mixed $columnNum The column in array from which to return a value. If column_num is omitted, row_num is required.
|
||||||
* @param mixed $arrayValues
|
|
||||||
* @param mixed $rowNum
|
|
||||||
* @param mixed $columnNum
|
|
||||||
*
|
*
|
||||||
* @return mixed the value of a specified cell or array of cells
|
* @return mixed the value of a specified cell or array of cells
|
||||||
*/
|
*/
|
||||||
|
@ -692,14 +676,10 @@ class LookupRef
|
||||||
* VLOOKUP
|
* VLOOKUP
|
||||||
* The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number.
|
* The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number.
|
||||||
*
|
*
|
||||||
* @param lookup_value The value that you want to match in lookup_array
|
* @param mixed $lookup_value The value that you want to match in lookup_array
|
||||||
* @param lookup_array The range of cells being searched
|
* @param mixed $lookup_array The range of cells being searched
|
||||||
* @param index_number The column number in table_array from which the matching value must be returned. The first column is 1.
|
* @param mixed $index_number The column number in table_array from which the matching value must be returned. The first column is 1.
|
||||||
* @param not_exact_match determines if you are looking for an exact match based on lookup_value
|
* @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value
|
||||||
* @param mixed $lookup_value
|
|
||||||
* @param mixed $lookup_array
|
|
||||||
* @param mixed $index_number
|
|
||||||
* @param mixed $not_exact_match
|
|
||||||
*
|
*
|
||||||
* @return mixed The value of the found cell
|
* @return mixed The value of the found cell
|
||||||
*/
|
*/
|
||||||
|
@ -761,14 +741,10 @@ class LookupRef
|
||||||
* HLOOKUP
|
* HLOOKUP
|
||||||
* The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number.
|
* The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number.
|
||||||
*
|
*
|
||||||
* @param lookup_value The value that you want to match in lookup_array
|
* @param mixed $lookup_value The value that you want to match in lookup_array
|
||||||
* @param lookup_array The range of cells being searched
|
* @param mixed $lookup_array The range of cells being searched
|
||||||
* @param index_number The row number in table_array from which the matching value must be returned. The first row is 1.
|
* @param mixed $index_number The row number in table_array from which the matching value must be returned. The first row is 1.
|
||||||
* @param not_exact_match determines if you are looking for an exact match based on lookup_value
|
* @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value
|
||||||
* @param mixed $lookup_value
|
|
||||||
* @param mixed $lookup_array
|
|
||||||
* @param mixed $index_number
|
|
||||||
* @param mixed $not_exact_match
|
|
||||||
*
|
*
|
||||||
* @return mixed The value of the found cell
|
* @return mixed The value of the found cell
|
||||||
*/
|
*/
|
||||||
|
@ -826,12 +802,9 @@ class LookupRef
|
||||||
* LOOKUP
|
* LOOKUP
|
||||||
* The LOOKUP function searches for value either from a one-row or one-column range or from an array.
|
* The LOOKUP function searches for value either from a one-row or one-column range or from an array.
|
||||||
*
|
*
|
||||||
* @param lookup_value The value that you want to match in lookup_array
|
* @param mixed $lookup_value The value that you want to match in lookup_array
|
||||||
* @param lookup_vector The range of cells being searched
|
* @param mixed $lookup_vector The range of cells being searched
|
||||||
* @param result_vector The column from which the matching value must be returned
|
* @param null|mixed $result_vector The column from which the matching value must be returned
|
||||||
* @param mixed $lookup_value
|
|
||||||
* @param mixed $lookup_vector
|
|
||||||
* @param null|mixed $result_vector
|
|
||||||
*
|
*
|
||||||
* @return mixed The value of the found cell
|
* @return mixed The value of the found cell
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -48,14 +48,11 @@ class Statistical
|
||||||
*
|
*
|
||||||
* The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992).
|
* The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992).
|
||||||
*
|
*
|
||||||
* @param x require 0<=x<=1
|
* @param mixed $x require 0<=x<=1
|
||||||
* @param p require p>0
|
* @param mixed $p require p>0
|
||||||
* @param q require q>0
|
* @param mixed $q require q>0
|
||||||
* @param mixed $x
|
|
||||||
* @param mixed $p
|
|
||||||
* @param mixed $q
|
|
||||||
*
|
*
|
||||||
* @return 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow
|
* @return float 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow
|
||||||
*/
|
*/
|
||||||
private static function incompleteBeta($x, $p, $q)
|
private static function incompleteBeta($x, $p, $q)
|
||||||
{
|
{
|
||||||
|
@ -82,12 +79,10 @@ class Statistical
|
||||||
/**
|
/**
|
||||||
* The natural logarithm of the beta function.
|
* The natural logarithm of the beta function.
|
||||||
*
|
*
|
||||||
* @param p require p>0
|
* @param mixed $p require p>0
|
||||||
* @param q require q>0
|
* @param mixed $q require q>0
|
||||||
* @param mixed $p
|
|
||||||
* @param mixed $q
|
|
||||||
*
|
*
|
||||||
* @return 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow
|
* @return float 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow
|
||||||
*
|
*
|
||||||
* @author Jaco van Kooten
|
* @author Jaco van Kooten
|
||||||
*/
|
*/
|
||||||
|
@ -115,6 +110,8 @@ class Statistical
|
||||||
* @param mixed $x
|
* @param mixed $x
|
||||||
* @param mixed $p
|
* @param mixed $p
|
||||||
* @param mixed $q
|
* @param mixed $q
|
||||||
|
*
|
||||||
|
* @return float
|
||||||
*/
|
*/
|
||||||
private static function betaFraction($x, $p, $q)
|
private static function betaFraction($x, $p, $q)
|
||||||
{
|
{
|
||||||
|
@ -205,7 +202,7 @@ class Statistical
|
||||||
* The computation is believed to be free of underflow and overflow.
|
* The computation is believed to be free of underflow and overflow.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @return MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305
|
* @return float MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Function cache for logGamma
|
// Function cache for logGamma
|
||||||
|
|
|
@ -272,7 +272,7 @@ class Layout
|
||||||
/**
|
/**
|
||||||
* Set Width.
|
* Set Width.
|
||||||
*
|
*
|
||||||
* @param Width $value
|
* @param float $value
|
||||||
*
|
*
|
||||||
* @return Layout
|
* @return Layout
|
||||||
*/
|
*/
|
||||||
|
@ -296,7 +296,7 @@ class Layout
|
||||||
/**
|
/**
|
||||||
* Set Height.
|
* Set Height.
|
||||||
*
|
*
|
||||||
* @param Height $value
|
* @param float $value
|
||||||
*
|
*
|
||||||
* @return Layout
|
* @return Layout
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -168,23 +168,23 @@ class Properties
|
||||||
/**
|
/**
|
||||||
* Set Created.
|
* Set Created.
|
||||||
*
|
*
|
||||||
* @param datetime $pValue
|
* @param int|string $time
|
||||||
*
|
*
|
||||||
* @return Properties
|
* @return Properties
|
||||||
*/
|
*/
|
||||||
public function setCreated($pValue)
|
public function setCreated($time)
|
||||||
{
|
{
|
||||||
if ($pValue === null) {
|
if ($time === null) {
|
||||||
$pValue = time();
|
$time = time();
|
||||||
} elseif (is_string($pValue)) {
|
} elseif (is_string($time)) {
|
||||||
if (is_numeric($pValue)) {
|
if (is_numeric($time)) {
|
||||||
$pValue = (int) $pValue;
|
$time = (int) $time;
|
||||||
} else {
|
} else {
|
||||||
$pValue = strtotime($pValue);
|
$time = strtotime($time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->created = $pValue;
|
$this->created = $time;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -202,23 +202,23 @@ class Properties
|
||||||
/**
|
/**
|
||||||
* Set Modified.
|
* Set Modified.
|
||||||
*
|
*
|
||||||
* @param datetime $pValue
|
* @param int|string $time
|
||||||
*
|
*
|
||||||
* @return Properties
|
* @return Properties
|
||||||
*/
|
*/
|
||||||
public function setModified($pValue)
|
public function setModified($time)
|
||||||
{
|
{
|
||||||
if ($pValue === null) {
|
if ($time === null) {
|
||||||
$pValue = time();
|
$time = time();
|
||||||
} elseif (is_string($pValue)) {
|
} elseif (is_string($time)) {
|
||||||
if (is_numeric($pValue)) {
|
if (is_numeric($time)) {
|
||||||
$pValue = (int) $pValue;
|
$time = (int) $time;
|
||||||
} else {
|
} else {
|
||||||
$pValue = strtotime($pValue);
|
$time = strtotime($time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->modified = $pValue;
|
$this->modified = $time;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,10 +253,9 @@ class Xml extends BaseReader
|
||||||
/**
|
/**
|
||||||
* pixel units to excel width units(units of 1/256th of a character width).
|
* pixel units to excel width units(units of 1/256th of a character width).
|
||||||
*
|
*
|
||||||
* @param pxs
|
* @param float $pxs
|
||||||
* @param mixed $pxs
|
|
||||||
*
|
*
|
||||||
* @return
|
* @return float
|
||||||
*/
|
*/
|
||||||
protected static function pixel2WidthUnits($pxs)
|
protected static function pixel2WidthUnits($pxs)
|
||||||
{
|
{
|
||||||
|
@ -271,10 +270,9 @@ class Xml extends BaseReader
|
||||||
/**
|
/**
|
||||||
* excel width units(units of 1/256th of a character width) to pixel units.
|
* excel width units(units of 1/256th of a character width) to pixel units.
|
||||||
*
|
*
|
||||||
* @param widthUnits
|
* @param float $widthUnits
|
||||||
* @param mixed $widthUnits
|
|
||||||
*
|
*
|
||||||
* @return
|
* @return float
|
||||||
*/
|
*/
|
||||||
protected static function widthUnits2Pixel($widthUnits)
|
protected static function widthUnits2Pixel($widthUnits)
|
||||||
{
|
{
|
||||||
|
|
|
@ -777,10 +777,7 @@ class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Constructor: Check for symmetry, then construct the eigenvalue decomposition.
|
* Constructor: Check for symmetry, then construct the eigenvalue decomposition.
|
||||||
*
|
*
|
||||||
* @param A Square matrix
|
* @param mixed $Arg A Square matrix
|
||||||
* @param mixed $Arg
|
|
||||||
*
|
|
||||||
* @return Structure to access D and V
|
|
||||||
*/
|
*/
|
||||||
public function __construct($Arg)
|
public function __construct($Arg)
|
||||||
{
|
{
|
||||||
|
@ -813,7 +810,7 @@ class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Return the eigenvector matrix.
|
* Return the eigenvector matrix.
|
||||||
*
|
*
|
||||||
* @return V
|
* @return Matrix V
|
||||||
*/
|
*/
|
||||||
public function getV()
|
public function getV()
|
||||||
{
|
{
|
||||||
|
@ -823,7 +820,7 @@ class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Return the real parts of the eigenvalues.
|
* Return the real parts of the eigenvalues.
|
||||||
*
|
*
|
||||||
* @return real(diag(D))
|
* @return array real(diag(D))
|
||||||
*/
|
*/
|
||||||
public function getRealEigenvalues()
|
public function getRealEigenvalues()
|
||||||
{
|
{
|
||||||
|
@ -833,7 +830,7 @@ class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Return the imaginary parts of the eigenvalues.
|
* Return the imaginary parts of the eigenvalues.
|
||||||
*
|
*
|
||||||
* @return imag(diag(D))
|
* @return array imag(diag(D))
|
||||||
*/
|
*/
|
||||||
public function getImagEigenvalues()
|
public function getImagEigenvalues()
|
||||||
{
|
{
|
||||||
|
@ -843,7 +840,7 @@ class EigenvalueDecomposition
|
||||||
/**
|
/**
|
||||||
* Return the block diagonal eigenvalue matrix.
|
* Return the block diagonal eigenvalue matrix.
|
||||||
*
|
*
|
||||||
* @return D
|
* @return Matrix D
|
||||||
*/
|
*/
|
||||||
public function getD()
|
public function getD()
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,8 +65,6 @@ class LUDecomposition
|
||||||
* LU Decomposition constructor.
|
* LU Decomposition constructor.
|
||||||
*
|
*
|
||||||
* @param Matrix $A Rectangular matrix
|
* @param Matrix $A Rectangular matrix
|
||||||
*
|
|
||||||
* @return Structure to access L, U and piv
|
|
||||||
*/
|
*/
|
||||||
public function __construct($A)
|
public function __construct($A)
|
||||||
{
|
{
|
||||||
|
@ -242,12 +240,12 @@ class LUDecomposition
|
||||||
/**
|
/**
|
||||||
* Solve A*X = B.
|
* Solve A*X = B.
|
||||||
*
|
*
|
||||||
* @param $B a Matrix with as many rows as A and any number of columns
|
* @param mixed $B a Matrix with as many rows as A and any number of columns
|
||||||
*
|
*
|
||||||
* @throws CalculationException illegalArgumentException Matrix row dimensions must agree
|
* @throws CalculationException illegalArgumentException Matrix row dimensions must agree
|
||||||
* @throws CalculationException runtimeException Matrix is singular
|
* @throws CalculationException runtimeException Matrix is singular
|
||||||
*
|
*
|
||||||
* @return X so that L*U*X = B(piv,:)
|
* @return Matrix X so that L*U*X = B(piv,:)
|
||||||
*/
|
*/
|
||||||
public function solve($B)
|
public function solve($B)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,8 +55,6 @@ class QRDecomposition
|
||||||
* QR Decomposition computed by Householder reflections.
|
* QR Decomposition computed by Householder reflections.
|
||||||
*
|
*
|
||||||
* @param matrix $A Rectangular matrix
|
* @param matrix $A Rectangular matrix
|
||||||
*
|
|
||||||
* @return Structure to access R and the Householder vectors and compute Q
|
|
||||||
*/
|
*/
|
||||||
public function __construct($A)
|
public function __construct($A)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,10 +60,7 @@ class SingularValueDecomposition
|
||||||
*
|
*
|
||||||
* Derived from LINPACK code.
|
* Derived from LINPACK code.
|
||||||
*
|
*
|
||||||
* @param $A Rectangular matrix
|
* @param mixed $Arg Rectangular matrix
|
||||||
* @param mixed $Arg
|
|
||||||
*
|
|
||||||
* @return Structure to access U, S and V
|
|
||||||
*/
|
*/
|
||||||
public function __construct($Arg)
|
public function __construct($Arg)
|
||||||
{
|
{
|
||||||
|
@ -445,7 +442,7 @@ class SingularValueDecomposition
|
||||||
/**
|
/**
|
||||||
* Return the left singular vectors.
|
* Return the left singular vectors.
|
||||||
*
|
*
|
||||||
* @return U
|
* @return Matrix U
|
||||||
*/
|
*/
|
||||||
public function getU()
|
public function getU()
|
||||||
{
|
{
|
||||||
|
@ -455,7 +452,7 @@ class SingularValueDecomposition
|
||||||
/**
|
/**
|
||||||
* Return the right singular vectors.
|
* Return the right singular vectors.
|
||||||
*
|
*
|
||||||
* @return V
|
* @return Matrix V
|
||||||
*/
|
*/
|
||||||
public function getV()
|
public function getV()
|
||||||
{
|
{
|
||||||
|
@ -465,7 +462,7 @@ class SingularValueDecomposition
|
||||||
/**
|
/**
|
||||||
* Return the one-dimensional array of singular values.
|
* Return the one-dimensional array of singular values.
|
||||||
*
|
*
|
||||||
* @return diagonal of S
|
* @return array diagonal of S
|
||||||
*/
|
*/
|
||||||
public function getSingularValues()
|
public function getSingularValues()
|
||||||
{
|
{
|
||||||
|
@ -475,7 +472,7 @@ class SingularValueDecomposition
|
||||||
/**
|
/**
|
||||||
* Return the diagonal matrix of singular values.
|
* Return the diagonal matrix of singular values.
|
||||||
*
|
*
|
||||||
* @return S
|
* @return Matrix S
|
||||||
*/
|
*/
|
||||||
public function getS()
|
public function getS()
|
||||||
{
|
{
|
||||||
|
@ -492,7 +489,7 @@ class SingularValueDecomposition
|
||||||
/**
|
/**
|
||||||
* Two norm.
|
* Two norm.
|
||||||
*
|
*
|
||||||
* @return max(S)
|
* @return float max(S)
|
||||||
*/
|
*/
|
||||||
public function norm2()
|
public function norm2()
|
||||||
{
|
{
|
||||||
|
@ -502,7 +499,7 @@ class SingularValueDecomposition
|
||||||
/**
|
/**
|
||||||
* Two norm condition number.
|
* Two norm condition number.
|
||||||
*
|
*
|
||||||
* @return max(S)/min(S)
|
* @return float max(S)/min(S)
|
||||||
*/
|
*/
|
||||||
public function cond()
|
public function cond()
|
||||||
{
|
{
|
||||||
|
@ -512,7 +509,7 @@ class SingularValueDecomposition
|
||||||
/**
|
/**
|
||||||
* Effective numerical matrix rank.
|
* Effective numerical matrix rank.
|
||||||
*
|
*
|
||||||
* @return Number of nonnegligible singular values
|
* @return int Number of nonnegligible singular values
|
||||||
*/
|
*/
|
||||||
public function rank()
|
public function rank()
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace PhpOffice\PhpSpreadsheet\Shared;
|
||||||
|
|
||||||
use PhpOffice\PhpSpreadsheet\Reader\Exception as ReaderException;
|
use PhpOffice\PhpSpreadsheet\Reader\Exception as ReaderException;
|
||||||
use PhpOffice\PhpSpreadsheet\Shared\OLE\ChainedBlockStream;
|
use PhpOffice\PhpSpreadsheet\Shared\OLE\ChainedBlockStream;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\Root;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Array for storing OLE instances that are accessed from
|
* Array for storing OLE instances that are accessed from
|
||||||
|
@ -66,7 +67,7 @@ class OLE
|
||||||
/**
|
/**
|
||||||
* Root directory of OLE container.
|
* Root directory of OLE container.
|
||||||
*
|
*
|
||||||
* @var OLE_PPS_Root
|
* @var Root
|
||||||
*/
|
*/
|
||||||
public $root;
|
public $root;
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ class OLE
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $bigBlockThreshold;
|
public $bigBlockThreshold;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads an OLE container from the contents of the file given.
|
* Reads an OLE container from the contents of the file given.
|
||||||
|
@ -214,8 +215,7 @@ class OLE
|
||||||
* Returns a stream for use with fread() etc. External callers should
|
* Returns a stream for use with fread() etc. External callers should
|
||||||
* use \PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\File::getStream().
|
* use \PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\File::getStream().
|
||||||
*
|
*
|
||||||
* @param int|PPS block id or PPS
|
* @param int|OLE\PPS $blockIdOrPps block id or PPS
|
||||||
* @param mixed $blockIdOrPps
|
|
||||||
*
|
*
|
||||||
* @return resource read-only stream
|
* @return resource read-only stream
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace PhpOffice\PhpSpreadsheet\Shared\OLE;
|
namespace PhpOffice\PhpSpreadsheet\Shared\OLE;
|
||||||
|
|
||||||
|
use PhpOffice\PhpSpreadsheet\Shared\OLE;
|
||||||
|
|
||||||
class ChainedBlockStream
|
class ChainedBlockStream
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -87,15 +87,15 @@ class Spreadsheet
|
||||||
private $hasMacros = false;
|
private $hasMacros = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* macrosCode : all macros code (the vbaProject.bin file, this include form, code, etc.), null if no macro.
|
* macrosCode : all macros code as binary data (the vbaProject.bin file, this include form, code, etc.), null if no macro.
|
||||||
*
|
*
|
||||||
* @var binary
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $macrosCode;
|
private $macrosCode;
|
||||||
/**
|
/**
|
||||||
* macrosCertificate : if macros are signed, contains vbaProjectSignature.bin file, null if not signed.
|
* macrosCertificate : if macros are signed, contains binary data vbaProjectSignature.bin file, null if not signed.
|
||||||
*
|
*
|
||||||
* @var binary
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $macrosCertificate;
|
private $macrosCertificate;
|
||||||
|
|
||||||
|
|
|
@ -184,8 +184,6 @@ class Style extends Supervisor
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @param bool $pAdvanced advanced mode for setting borders
|
* @param bool $pAdvanced advanced mode for setting borders
|
||||||
*
|
*
|
||||||
* @throws Exception
|
|
||||||
*
|
|
||||||
* @return Style
|
* @return Style
|
||||||
*/
|
*/
|
||||||
public function applyFromArray(array $pStyles, $pAdvanced = true)
|
public function applyFromArray(array $pStyles, $pAdvanced = true)
|
||||||
|
|
|
@ -7,6 +7,7 @@ use PhpOffice\PhpSpreadsheet\Shared\XMLWriter;
|
||||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Border;
|
use PhpOffice\PhpSpreadsheet\Style\Border;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Borders;
|
use PhpOffice\PhpSpreadsheet\Style\Borders;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\Conditional;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
use PhpOffice\PhpSpreadsheet\Style\Fill;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\Font;
|
use PhpOffice\PhpSpreadsheet\Style\Font;
|
||||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
|
@ -151,8 +152,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param XMLWriter $objWriter XML Writer
|
* @param XMLWriter $objWriter XML Writer
|
||||||
* @param Fill $pFill Fill style
|
* @param Fill $pFill Fill style
|
||||||
*
|
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*/
|
*/
|
||||||
private function writeFill(XMLWriter $objWriter, Fill $pFill)
|
private function writeFill(XMLWriter $objWriter, Fill $pFill)
|
||||||
{
|
{
|
||||||
|
@ -172,8 +171,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param XMLWriter $objWriter XML Writer
|
* @param XMLWriter $objWriter XML Writer
|
||||||
* @param Fill $pFill Fill style
|
* @param Fill $pFill Fill style
|
||||||
*
|
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*/
|
*/
|
||||||
private function writeGradientFill(XMLWriter $objWriter, Fill $pFill)
|
private function writeGradientFill(XMLWriter $objWriter, Fill $pFill)
|
||||||
{
|
{
|
||||||
|
@ -217,8 +214,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param XMLWriter $objWriter XML Writer
|
* @param XMLWriter $objWriter XML Writer
|
||||||
* @param Fill $pFill Fill style
|
* @param Fill $pFill Fill style
|
||||||
*
|
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*/
|
*/
|
||||||
private function writePatternFill(XMLWriter $objWriter, Fill $pFill)
|
private function writePatternFill(XMLWriter $objWriter, Fill $pFill)
|
||||||
{
|
{
|
||||||
|
@ -256,8 +251,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param XMLWriter $objWriter XML Writer
|
* @param XMLWriter $objWriter XML Writer
|
||||||
* @param Font $pFont Font style
|
* @param Font $pFont Font style
|
||||||
*
|
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*/
|
*/
|
||||||
private function writeFont(XMLWriter $objWriter, Font $pFont)
|
private function writeFont(XMLWriter $objWriter, Font $pFont)
|
||||||
{
|
{
|
||||||
|
@ -337,8 +330,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param XMLWriter $objWriter XML Writer
|
* @param XMLWriter $objWriter XML Writer
|
||||||
* @param Borders $pBorders Borders style
|
* @param Borders $pBorders Borders style
|
||||||
*
|
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*/
|
*/
|
||||||
private function writeBorder(XMLWriter $objWriter, Borders $pBorders)
|
private function writeBorder(XMLWriter $objWriter, Borders $pBorders)
|
||||||
{
|
{
|
||||||
|
@ -520,8 +511,6 @@ class Style extends WriterPart
|
||||||
* @param XMLWriter $objWriter XML Writer
|
* @param XMLWriter $objWriter XML Writer
|
||||||
* @param string $pName Element name
|
* @param string $pName Element name
|
||||||
* @param Border $pBorder Border style
|
* @param Border $pBorder Border style
|
||||||
*
|
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*/
|
*/
|
||||||
private function writeBorderPr(XMLWriter $objWriter, $pName, Border $pBorder)
|
private function writeBorderPr(XMLWriter $objWriter, $pName, Border $pBorder)
|
||||||
{
|
{
|
||||||
|
@ -545,8 +534,6 @@ class Style extends WriterPart
|
||||||
* @param XMLWriter $objWriter XML Writer
|
* @param XMLWriter $objWriter XML Writer
|
||||||
* @param NumberFormat $pNumberFormat Number Format
|
* @param NumberFormat $pNumberFormat Number Format
|
||||||
* @param int $pId Number Format identifier
|
* @param int $pId Number Format identifier
|
||||||
*
|
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*/
|
*/
|
||||||
private function writeNumFmt(XMLWriter $objWriter, NumberFormat $pNumberFormat, $pId = 0)
|
private function writeNumFmt(XMLWriter $objWriter, NumberFormat $pNumberFormat, $pId = 0)
|
||||||
{
|
{
|
||||||
|
@ -567,8 +554,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param Spreadsheet $spreadsheet
|
* @param Spreadsheet $spreadsheet
|
||||||
*
|
*
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*
|
|
||||||
* @return \PhpOffice\PhpSpreadsheet\Style\Style[] All styles in PhpSpreadsheet
|
* @return \PhpOffice\PhpSpreadsheet\Style\Style[] All styles in PhpSpreadsheet
|
||||||
*/
|
*/
|
||||||
public function allStyles(Spreadsheet $spreadsheet)
|
public function allStyles(Spreadsheet $spreadsheet)
|
||||||
|
@ -581,8 +566,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param Spreadsheet $spreadsheet
|
* @param Spreadsheet $spreadsheet
|
||||||
*
|
*
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*
|
|
||||||
* @return Conditional[] All conditional styles in PhpSpreadsheet
|
* @return Conditional[] All conditional styles in PhpSpreadsheet
|
||||||
*/
|
*/
|
||||||
public function allConditionalStyles(Spreadsheet $spreadsheet)
|
public function allConditionalStyles(Spreadsheet $spreadsheet)
|
||||||
|
@ -607,8 +590,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param Spreadsheet $spreadsheet
|
* @param Spreadsheet $spreadsheet
|
||||||
*
|
*
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*
|
|
||||||
* @return Fill[] All fills in PhpSpreadsheet
|
* @return Fill[] All fills in PhpSpreadsheet
|
||||||
*/
|
*/
|
||||||
public function allFills(Spreadsheet $spreadsheet)
|
public function allFills(Spreadsheet $spreadsheet)
|
||||||
|
@ -641,8 +622,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param Spreadsheet $spreadsheet
|
* @param Spreadsheet $spreadsheet
|
||||||
*
|
*
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*
|
|
||||||
* @return Font[] All fonts in PhpSpreadsheet
|
* @return Font[] All fonts in PhpSpreadsheet
|
||||||
*/
|
*/
|
||||||
public function allFonts(Spreadsheet $spreadsheet)
|
public function allFonts(Spreadsheet $spreadsheet)
|
||||||
|
@ -666,8 +645,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param Spreadsheet $spreadsheet
|
* @param Spreadsheet $spreadsheet
|
||||||
*
|
*
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*
|
|
||||||
* @return Borders[] All borders in PhpSpreadsheet
|
* @return Borders[] All borders in PhpSpreadsheet
|
||||||
*/
|
*/
|
||||||
public function allBorders(Spreadsheet $spreadsheet)
|
public function allBorders(Spreadsheet $spreadsheet)
|
||||||
|
@ -691,8 +668,6 @@ class Style extends WriterPart
|
||||||
*
|
*
|
||||||
* @param Spreadsheet $spreadsheet
|
* @param Spreadsheet $spreadsheet
|
||||||
*
|
*
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
|
||||||
*
|
|
||||||
* @return NumberFormat[] All number formats in PhpSpreadsheet
|
* @return NumberFormat[] All number formats in PhpSpreadsheet
|
||||||
*/
|
*/
|
||||||
public function allNumberFormats(Spreadsheet $spreadsheet)
|
public function allNumberFormats(Spreadsheet $spreadsheet)
|
||||||
|
|
Loading…
Reference in New Issue