All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aiddl-test.math.linear-algebra.test-cases.aiddl Maven / Gradle / Ivy

Go to download

Provides common types and algorithm implementations for the fast prototyping integrative AI systems with the AIDDL framework.

The newest version!
(#mod self org.aiddl.linear-algebra.test)

(#req EVAL org.aiddl.eval.namespace)
(#nms nms-basic basic-ops@EVAL)
(#nms nms-type type-ops@EVAL)
(#nms nms-logic logic-ops@EVAL)

(#req LA org.aiddl.common.math.linear-algebra)

(symbolic matrix-mult org.aiddl.common.linear-algebra.matrix-mult)
(symbolic vector-mult org.aiddl.common.linear-algebra.vector-mult)

(^Matrix@LA A
  (
    (1.0 2.0 3.0)
    (4.0 5.0 6.0)
    (7.0 8.0 9.0) ))
    
(^Matrix@LA B
  (
    (1.0 0.0 0.0)
    (0.0 1.0 0.0)
    (0.0 0.0 1.0) ))

(#assert@LA t1
    (=
      ($matrix-mult $A $B)
      $A))

(#assert@LA t2 (has-type $A ^Matrix@LA))
         
(^Matrix@LA M1
  (
    (1.0 2.0 -3.0)
    (4.2 1.0 72.0)
    (0.0 -2.0 2.0)
  )
)

(#assert t3 (has-type $M1 ^Matrix@LA))

(^tuple M2
  (
    (1.0 0.0)
    (0.0 1.0 0.0)
    (0.0 0.0 1.0)
  )
)

(#assert t4 (not (has-type $M2 ^Matrix@LA)))

(^Matrix@LA M3
  ( )
)

(#assert t5 (has-type $M3 ^Matrix@LA))

(^Matrix empty_1 (()))

(#assert t8 (has-type $empty_1 ^Matrix@LA))

(^tuple M_2x2_vars ((?A ?B)(?C ?D)))

(#assert t10 (not (has-type $M_2x2_vars ^Matrix@LA)))

		




© 2015 - 2025 Weber Informatics LLC | Privacy Policy