math.vectors: rename "h." to "hdot"

flac
John Benediktsson 2020-02-26 13:06:52 -08:00 committed by Steve Ayerhart
parent 3bd9eadd9a
commit 5b0d28d055
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
3 changed files with 5 additions and 5 deletions

View File

@ -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." } ;

View File

@ -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

View File

@ -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 ;