Skip to content

Commit

Permalink
restor form_matrix_product
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Oct 31, 2023
1 parent 02dcf7a commit c0067a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions FIAT/polynomial_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ def project(f, U, Q):
return coeffs


def form_matrix_product(mats, alpha):
"""Forms product over mats[i]**alpha[i]"""
m = mats[0].shape[0]
result = numpy.eye(m)
for i in range(len(alpha)):
for j in range(alpha[i]):
result = numpy.dot(mats[i], result)
return result


def polynomial_set_union_normalized(A, B):
"""Given polynomial sets A and B, constructs a new polynomial set
whose span is the same as that of span(A) union span(B). It may
Expand Down

0 comments on commit c0067a7

Please sign in to comment.