PHP Class NumPHP\Core\NumPHP

Since: 1.0.0
Author: Gordon Lesti ([email protected])
Afficher le fichier Open project: numphp/numphp Class Usage Examples

Méthodes publiques

Méthode Description
arange ( float $low, float $high, float $step = 1 ) : NumArray Creates a vector (NumArray) from $low to $high with $step steps
eye ( integer $mAxis, integer $nAxis ) : NumArray Returns a matrix (NumArray) filled with 0 and 1 on the main diagonal
identity ( integer $mAxis ) : NumArray Returns a identity matrix (NumArray) filled with 0 and 1 on the main diagonal
linspace ( float $low, float $high, integer $number ) : NumArray Creates a vector (NumArray) from $low to $high with the size of $number
ones ( ) : NumArray Returns a NumArray filled with 1
onesLike ( NumArray $numArray ) : NumArray Returns a NumArray with the same size, but filled with 1
rand ( ) : NumArray Returns a NumArray filled with random values
randLike ( NumArray $numArray ) : NumArray Returns a NumArray with the same size, but filled with random values
zeros ( ) : NumArray Returns a NumArray filled with 0
zerosLike ( NumArray $numArray ) : NumArray Returns a NumArray with the same size, but filled with 0

Method Details

arange() public static méthode

Creates a vector (NumArray) from $low to $high with $step steps
Since: 1.0.0
public static arange ( float $low, float $high, float $step = 1 ) : NumArray
$low float beginning of the vector
$high float end of the vector
$step float steps, if not given `$step` = `1.0`
Résultat NumArray

eye() public static méthode

Returns a matrix (NumArray) filled with 0 and 1 on the main diagonal
Since: 1.0.0
public static eye ( integer $mAxis, integer $nAxis ) : NumArray
$mAxis integer size of the m axis
$nAxis integer size of the n axis, if not given `$nAxis` = `$mAxis`
Résultat NumArray

identity() public static méthode

Returns a identity matrix (NumArray) filled with 0 and 1 on the main diagonal
Since: 1.0.0
public static identity ( integer $mAxis ) : NumArray
$mAxis integer size of the m axis and n axis
Résultat NumArray

linspace() public static méthode

Creates a vector (NumArray) from $low to $high with the size of $number
Since: 1.0.0
public static linspace ( float $low, float $high, integer $number ) : NumArray
$low float beginning of the vector
$high float end of the vector
$number integer size of the vector
Résultat NumArray

ones() public static méthode

Returns a NumArray filled with 1
Since: 1.0.0
public static ones ( ) : NumArray
Résultat NumArray

onesLike() public static méthode

Returns a NumArray with the same size, but filled with 1
Since: 1.0.0
public static onesLike ( NumArray $numArray ) : NumArray
$numArray NumArray given NumArray
Résultat NumArray

rand() public static méthode

Returns a NumArray filled with random values
Since: 1.0.0
public static rand ( ) : NumArray
Résultat NumArray

randLike() public static méthode

Returns a NumArray with the same size, but filled with random values
Since: 1.0.0
public static randLike ( NumArray $numArray ) : NumArray
$numArray NumArray given NumArray
Résultat NumArray

zeros() public static méthode

Returns a NumArray filled with 0
Since: 1.0.0
public static zeros ( ) : NumArray
Résultat NumArray

zerosLike() public static méthode

Returns a NumArray with the same size, but filled with 0
Since: 1.0.0
public static zerosLike ( NumArray $numArray ) : NumArray
$numArray NumArray given NumArray
Résultat NumArray