]> gitweb.factorcode.org Git - factor.git/commitdiff
math.vectors: rename "h." to "hdot"
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 26 Feb 2020 21:06:52 +0000 (13:06 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 26 Feb 2020 21:06:52 +0000 (13:06 -0800)
basis/math/vectors/vectors-docs.factor
basis/math/vectors/vectors-tests.factor
basis/math/vectors/vectors.factor

index cb1a0012146de7f8787ceefad9389278d66731c2..04e013538dd5ca4c614a7e540a6164745613406c 100644 (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." } ;
 
index 69fdf57081d79c0d70619b7927b7b38ce3e8ac5b..48de485977d188e6a3e57b3365ee457b957f879a 100644 (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
index 006011166e2ff5945072c3885b99be7971a5e795..ac2f443dc7625b1e45d344e1fb84d50d03d1130c 100644 (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 ;