Overview

Namespaces

  • Chippyash
    • Math
      • Matrix
        • Attribute
        • Computation
          • Add
          • Div
          • Mul
          • Sub
        • Decomposition
        • Derivative
          • Strategy
            • Determinant
        • Exceptions
        • Formatter
          • DirectedGraph
        • Interfaces
        • Special
        • Traits
        • Transformation
          • Strategy
            • Invert

Classes

  • ComplexMatrix
  • FunctionMatrix
  • IdentityMatrix
  • MatrixFactory
  • NumericMatrix
  • RationalMatrix
  • ShiftMatrix
  • SpecialMatrix
  • ZeroMatrix
  • Overview
  • Namespace
  • Class
  • Tree

Class NumericMatrix

Construct a matrix whose entries are numeric, i.e int, float, IntType, FloatType or RationalType

On construction PHP native ints are converted to IntType and native float types are converted to RationalType

Chippyash\Matrix\Matrix
Extended by Chippyash\Math\Matrix\NumericMatrix uses Chippyash\Math\Matrix\Traits\ConvertNumberToNumeric

Direct known subclasses

Chippyash\Math\Matrix\ComplexMatrix, Chippyash\Math\Matrix\FunctionMatrix, Chippyash\Math\Matrix\RationalMatrix, Chippyash\Math\Matrix\ShiftMatrix

Indirect known subclasses

Chippyash\Math\Matrix\IdentityMatrix, Chippyash\Math\Matrix\ZeroMatrix
Namespace: Chippyash\Math\Matrix
Located at NumericMatrix.php
Methods summary
public
# __construct( Chippyash\Math\Matrix\NumericMatrix|array $source, mixed $normalizeDefault = 0 )

Construct a complete Matrix with all entries set to Chippyash/Type Takes a source matrix or array (which can be incomplete and converts each entry to Chippyash/Type), setting a default value if entry does not exist.

Construct a complete Matrix with all entries set to Chippyash/Type Takes a source matrix or array (which can be incomplete and converts each entry to Chippyash/Type), setting a default value if entry does not exist.

If a NumericMatrix is supplied as $source, the data is cloned into the Matrix with no further checks.

Parameters

$source
Array to initialise the matrix with
$normalizeDefault
Value to set missing vertices

Throws

Chippyash\Math\Matrix\Exceptions\MathMatrixException
public boolean
# test( string|AttributeInterface $attribute )

Raw form of is() method. You can use this to test for attributes not supplied with the library by passing in $attribute conforming to AttributeInterface. If it's something you think is important , consider contributing it to the library.

Raw form of is() method. You can use this to test for attributes not supplied with the library by passing in $attribute conforming to AttributeInterface. If it's something you think is important , consider contributing it to the library.

Parameters

$attribute

Returns

boolean

Throws

NotAnAttributeInterfaceException
BadMethodCallException

Extendancestor

public Chippyash\Math\Matrix\NumericMatrix
# compute( Chippyash\Math\Matrix\Interfaces\ComputatationInterface $computation, mixed $extra = null )

Carry out a computation with this matrix as first argument and an optional second argument

Carry out a computation with this matrix as first argument and an optional second argument

Parameters

$computation
$extra

Returns

Chippyash\Math\Matrix\NumericMatrix
public numeric
# derive( Chippyash\Math\Matrix\Interfaces\DerivativeInterface $derivative, mixed $extra = null )

Find a derivative of this matrix as first argument and an optional second argument

Find a derivative of this matrix as first argument and an optional second argument

Parameters

$derivative
$extra

Returns

numeric
public Chippyash\Math\Matrix\Interfaces\DecompositionInterface
# decompose( Chippyash\Math\Matrix\Interfaces\DecompositionInterface $decomposition, mixed $extra = null )

Decompose this matrix

Decompose this matrix

Parameters

$decomposition
$extra

Returns

Chippyash\Math\Matrix\Interfaces\DecompositionInterface
public Chippyash\Math\Matrix\NumericMatrix
# transform( Chippyash\Matrix\Interfaces\TransformationInterface $transformation, mixed $extra = null )

Parameters

$transformation
$extra

Returns

Chippyash\Math\Matrix\NumericMatrix
public Chippyash\Math\Matrix\NumericMatrix
# __invoke( string $operationName,…, mixed $extra,… )

Invokable interface - allows object to be called as function Proxies to compute e.g. $matrix("Add\Matrix", $mB) Proxies to transform e.g. $matrix("Invert") Proxies to derive e.g. $matrix("Trace")

Invokable interface - allows object to be called as function Proxies to compute e.g. $matrix("Add\Matrix", $mB) Proxies to transform e.g. $matrix("Invert") Proxies to derive e.g. $matrix("Trace")

Parameters

$operationName,…
Name of operation to perform
$extra,…
Additional parameter required by the operation

Returns

Chippyash\Math\Matrix\NumericMatrix

Throws

InvalidArgumentException

Overideancestor

Constants summary
string NS_NUMERIC_ATTRIBUTE
# 'Chippyash\Math\Matrix\Attribute\Is'
string NS_COMPUTATION
# 'Chippyash\Math\Matrix\Computation\\'
string NS_NTRANSFORMATION
# 'Chippyash\Math\Matrix\Transformation\\'
string NS_DERIVATIVE
# 'Chippyash\Math\Matrix\Derivative\\'
string NS_DECOMPOSITION
# 'Chippyash\Math\Matrix\Decomposition\\'
Chippyash Math Matrix API documentation generated by ApiGen