diff --git a/basis/math/vectors/vectors-docs.factor b/basis/math/vectors/vectors-docs.factor index cb1a001214..04e013538d 100644 --- a/basis/math/vectors/vectors-docs.factor +++ b/basis/math/vectors/vectors-docs.factor @@ -318,7 +318,7 @@ HELP: vdot { $values { "u" { $sequence real } } { "v" { $sequence real } } { "x" real } } { $description "Computes the dot product of two vectors." } ; -HELP: h. +HELP: hdot { $values { "u" { $sequence real } } { "v" { $sequence real } } { "x" real } } { $description "Computes the Hermitian inner product of two vectors." } ; diff --git a/basis/math/vectors/vectors-tests.factor b/basis/math/vectors/vectors-tests.factor index 69fdf57081..48de485977 100644 --- a/basis/math/vectors/vectors-tests.factor +++ b/basis/math/vectors/vectors-tests.factor @@ -33,7 +33,7 @@ SPECIALIZED-ARRAY: int { 32 } [ { 1 2 3 } { 4 5 6 } vdot ] unit-test { -1 } [ { C{ 0 1 } } dup vdot ] unit-test -{ 1 } [ { C{ 0 1 } } dup h. ] unit-test +{ 1 } [ { C{ 0 1 } } dup hdot ] unit-test { { 1 2 3 } } [ { t t t } [ { 1 2 3 } ] [ { 4 5 6 } ] vif diff --git a/basis/math/vectors/vectors.factor b/basis/math/vectors/vectors.factor index 006011166e..ac2f443dc7 100644 --- a/basis/math/vectors/vectors.factor +++ b/basis/math/vectors/vectors.factor @@ -220,8 +220,8 @@ M: object v? GENERIC: vdot ( u v -- x ) M: object vdot [ * ] [ + ] 2map-reduce ; inline -GENERIC: h. ( u v -- x ) -M: object h. [ conjugate * ] [ + ] 2map-reduce ; inline +GENERIC: hdot ( u v -- x ) +M: object hdot [ conjugate * ] [ + ] 2map-reduce ; inline GENERIC: norm-sq ( v -- x ) M: object norm-sq [ absq ] [ + ] map-reduce ; inline @@ -294,4 +294,4 @@ PRIVATE> dupd proj v- ; : angle-between ( v u -- a ) - [ normalize ] bi@ h. acos ; + [ normalize ] bi@ hdot acos ;