PHP Класс NumPHP\Core\NumPHP

С версии: 1.0.0
Автор: Gordon Lesti ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

arange() публичный статический Метод

Creates a vector (NumArray) from $low to $high with $step steps
С версии: 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`
Результат NumArray

eye() публичный статический Метод

Returns a matrix (NumArray) filled with 0 and 1 on the main diagonal
С версии: 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`
Результат NumArray

identity() публичный статический Метод

Returns a identity matrix (NumArray) filled with 0 and 1 on the main diagonal
С версии: 1.0.0
public static identity ( integer $mAxis ) : NumArray
$mAxis integer size of the m axis and n axis
Результат NumArray

linspace() публичный статический Метод

Creates a vector (NumArray) from $low to $high with the size of $number
С версии: 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
Результат NumArray

ones() публичный статический Метод

Returns a NumArray filled with 1
С версии: 1.0.0
public static ones ( ) : NumArray
Результат NumArray

onesLike() публичный статический Метод

Returns a NumArray with the same size, but filled with 1
С версии: 1.0.0
public static onesLike ( NumArray $numArray ) : NumArray
$numArray NumArray given NumArray
Результат NumArray

rand() публичный статический Метод

Returns a NumArray filled with random values
С версии: 1.0.0
public static rand ( ) : NumArray
Результат NumArray

randLike() публичный статический Метод

Returns a NumArray with the same size, but filled with random values
С версии: 1.0.0
public static randLike ( NumArray $numArray ) : NumArray
$numArray NumArray given NumArray
Результат NumArray

zeros() публичный статический Метод

Returns a NumArray filled with 0
С версии: 1.0.0
public static zeros ( ) : NumArray
Результат NumArray

zerosLike() публичный статический Метод

Returns a NumArray with the same size, but filled with 0
С версии: 1.0.0
public static zerosLike ( NumArray $numArray ) : NumArray
$numArray NumArray given NumArray
Результат NumArray