Skip to content

Commit

Permalink
added logic template for Kronecker products with 1x1 identity matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat committed Aug 25, 2023
1 parent 959583b commit 521e6bf
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 154 deletions.
18 changes: 18 additions & 0 deletions LinearAlgebraForCAP/gap/CompilerLogic.gi
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,24 @@ CapJitAddLogicTemplate(
)
);

#
CapJitAddLogicTemplate(
rec(
variable_names := [ "ring", "matrix" ],
src_template := "KroneckerMat( HomalgIdentityMatrix( 1, ring ), matrix )",
dst_template := "matrix",
)
);

#
CapJitAddLogicTemplate(
rec(
variable_names := [ "ring", "matrix" ],
src_template := "KroneckerMat( matrix, HomalgIdentityMatrix( 1, ring ) )",
dst_template := "matrix",
)
);

# Length( [ 1 .. n ] ) -> n
CapJitAddLogicTemplate(
rec(
Expand Down
Loading

0 comments on commit 521e6bf

Please sign in to comment.