Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
MathPHP
LinearAlgebra
Vector
pNorm
MathPHP\LinearAlgebra\Vector::pNorm PHP Method
Vector Class Documentation
Show file
Open project: markrogoyski/math-php
pNorm()
public
method
https://en.wikipedia.org/wiki/Norm_(mathematics)#p-norm |x|p = (∑|xᵢ|ᵖ)¹/ᵖ
public
pNorm
(
$p
) :
number
return
number
public function pNorm($p) { return array_sum(Map\Single::pow($this->A, $p)) ** (1 / $p); }
Vector
__construct
__toString
add
asColumnMatrix
asRowMatrix
count
crossProduct
directProduct
dotProduct
get
getN
getVector
innerProduct
jsonSerialize
l1Norm
l2Norm
length
maxNorm
normalize
offsetExists
offsetGet
offsetSet
offsetUnset
outerProduct
pNorm
perp
perpDotProduct
perpendicular
projection
scalarDivide
scalarMultiply
subtract
sum