Commit 0de6ac7c authored by AVANZINI Martin's avatar AVANZINI Martin
Browse files

avoid constant norms in norm-template

parent 0e2fc169
This diff is collapsed.
...@@ -268,7 +268,8 @@ p1 `normTemplateEq` p2 = and $ P.coefficients $ ...@@ -268,7 +268,8 @@ p1 `normTemplateEq` p2 = and $ P.coefficients $
P.zipCoefficientsWith (const False) (const False) (\ _ _ -> True) p1 p2 P.zipCoefficientsWith (const False) (const False) (\ _ _ -> True) p1 p2
norm :: C.Norm -> NormTemplate norm :: C.Norm -> NormTemplate
norm = P.variable norm (C.Norm _ (E.Constant _)) = P.coefficient 1
norm n = P.variable n
normFromExp :: E.Exp -> NormTemplate normFromExp :: E.Exp -> NormTemplate
normFromExp e = norm (C.Norm (e .>= 0) e) normFromExp e = norm (C.Norm (e .>= 0) e)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment