@@ -21,13 +21,11 @@ type Linesearch struct {
21
21
initX []float64
22
22
dir []float64
23
23
24
- probInfo * ProblemInfo
25
-
26
24
lastEvalType EvaluationType
27
25
iterType IterationType
28
26
}
29
27
30
- func (ls * Linesearch ) Init (loc * Location , p * ProblemInfo , xNext []float64 ) (EvaluationType , IterationType , error ) {
28
+ func (ls * Linesearch ) Init (loc * Location , xNext []float64 ) (EvaluationType , IterationType , error ) {
31
29
ls .initX = resize (ls .initX , len (loc .X ))
32
30
copy (ls .initX , loc .X )
33
31
@@ -45,9 +43,8 @@ func (ls *Linesearch) Init(loc *Location, p *ProblemInfo, xNext []float64) (Eval
45
43
F : loc .F ,
46
44
Derivative : projGrad ,
47
45
}
48
- evalType := ls .Method .Init (lsLoc , stepSize , p )
46
+ evalType := ls .Method .Init (lsLoc , stepSize )
49
47
floats .AddScaledTo (xNext , ls .initX , stepSize , ls .dir )
50
- ls .probInfo = p
51
48
ls .lastEvalType = evalType
52
49
ls .iterType = MinorIteration
53
50
return evalType , ls .iterType , nil
@@ -120,7 +117,7 @@ func (ls *Linesearch) initNextLinesearch(loc *Location, xNext []float64) (Evalua
120
117
F : loc .F ,
121
118
Derivative : projGrad ,
122
119
}
123
- evalType := ls .Method .Init (lsLoc , stepsize , ls . probInfo )
120
+ evalType := ls .Method .Init (lsLoc , stepsize )
124
121
floats .AddScaledTo (xNext , ls .initX , stepsize , ls .dir )
125
122
// Compare the starting point for the current iteration with the next
126
123
// evaluation point to make sure that rounding errors do not prevent progress.
0 commit comments