class ConjGradient extends Error
The ConjGradient
implements the Polak-Ribiere Conjugate Gradient (PR-CG) Algorithm
for solving Non-Linear Programming (NLP) problems. PR-CG determines a search
direction as a weighted combination of the steepest descent direction (-gradient)
and the previous direction. The weighting is set by the beta function, which for
this implementation used the Polak-Ribiere technique.
dir_k = -gradient (x) + beta * dir_k-1
maximize f(x) subject to g(x) <= 0 [ optionally g(x) == 0 ]
- Alphabetic
- By Inheritance
- ConjGradient
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ConjGradient(f: FunctionV2S, g: FunctionV2S = null, ineq: Boolean = true)
- f
the objective function to be maximized
- g
the constraint function to be satisfied, if any
- ineq
whether the constraint function must satisfy inequality or equality
Type Members
- type Pair = (VectorD, VectorD)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
beta(gr1: VectorD, gr2: VectorD): Double
Compute the beta function using the Polak-Ribiere (PR) technique.
Compute the beta function using the Polak-Ribiere (PR) technique. The function determines how much of the prior direction is mixed in with -gradient.
- gr1
the gradient at the current point
- gr2
the gradient at the next point
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fg(x: VectorD): Double
The objective function f re-scaled by a weighted penalty, if constrained.
The objective function f re-scaled by a weighted penalty, if constrained.
- x
the coordinate values of the current point
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flaw(method: String, message: String): Unit
- Definition Classes
- Error
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lineSearch(x: VectorD, dir: VectorD): Double
Perform an inexact (e.g., 'WolfeLS' or exact (e.g., 'GoldenSectionLS' line search in the direction 'dir', returning the distance 'z' to move in that direction.
Perform an inexact (e.g., 'WolfeLS' or exact (e.g., 'GoldenSectionLS' line search in the direction 'dir', returning the distance 'z' to move in that direction.
- x
the current point
- dir
the direction to move in
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
setDerivatives(partials: Array[FunctionV2S]): Unit
Set the partial derivative functions.
Set the partial derivative functions. If these functions are available, they are more efficient and more accurate than estimating the values using difference quotients (the default approach).
- partials
the array of partial derivative functions
-
def
setSteepest(): Unit
Use the Steepest-Descent algorithm rather than the default PR-CG algorithm.
-
def
solve(x0: VectorD): VectorD
Solve the following Non-Linear Programming (NLP) problem using PR-CG: max { f(x) | g(x) <= 0 }.
Solve the following Non-Linear Programming (NLP) problem using PR-CG: max { f(x) | g(x) <= 0 }. To use explicit functions for gradient, replace 'gradient (fg, x._1 + s)' with 'gradientD (df, x._1 + s)'.
- x0
the starting point
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )