File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ T4=$(TR $(TDNW $(LREF $1)) $(TD $2) $(TD $3) $(TD $4))
1919module mir.math.stat ;
2020
2121import core.lifetime : move;
22- import mir.math.common: optmath ;
22+ import mir.math.common: fmamath ;
2323import mir.math.sum;
2424import mir.primitives;
2525import std.range.primitives : isInputRange;
@@ -34,7 +34,7 @@ Returns:
3434template mean (Summation summation = Summation.appropriate)
3535{
3636 // /
37- @safe @optmath sumType! Range
37+ @safe @fmamath sumType! Range
3838 mean(Range )(Range r)
3939 if (hasLength! Range
4040 || summation == Summation.appropriate
@@ -87,7 +87,7 @@ template simpleLinearRegression(Summation summation = Summation.kbn)
8787 Returns:
8888 The pair of shift and slope of the linear curve.
8989 +/
90- @optmath
90+ @fmamath
9191 sumType! YRange[2 ]
9292 simpleLinearRegression(XRange, YRange)(XRange x, YRange y) @safe
9393 if (isInputRange! XRange && isInputRange! YRange && ! (isArray! XRange && isArray! YRange) && isFloatingPoint! (sumType! YRange))
@@ -142,7 +142,7 @@ template simpleLinearRegression(Summation summation = Summation.kbn)
142142 }
143143
144144 // / ditto
145- @optmath
145+ @fmamath
146146 sumType! (Y[])[2 ]
147147 simpleLinearRegression(X, Y)(scope const X[] x, scope const Y[] y) @safe
148148 {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ struct Polynomial(F)
3939 Params:
4040 x = `x` point
4141 +/
42- @optmath typeof (F.init * X.init * 1f + F.init) opCall (X)(in X x)
42+ @optmath typeof (F.init * X.init * 1f + F.init) opCall (X)(in X x) const
4343 {
4444 import mir.internal.utility: Iota;
4545 auto ret = cast (typeof (return ))0 ;
You can’t perform that action at this time.
0 commit comments