LBFGS_FFM

scalation.optimization.quasi_newtonC.LBFGS_FFM
object LBFGS_FFM

The LBFGS_FFM object provides a set of functions to interact with the L-BFGS C library shared object through the use of Java's FFM abstractions, allowing the user to call the C implementation of the L-BFGS algorithm directly from Scala code.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
LBFGS_FFM.type

Members list

Value members

Concrete methods

def copyToMemorySegment(prm: LBFGSPrms, destination: MemorySegment): Unit

Copies the data in this LBFGSPrs instance to a destination MemorySegment.

Copies the data in this LBFGSPrs instance to a destination MemorySegment.

It is expected by this method that the destination memory segment was allocated using the memoryLayout MemoryLayout.

This method is only needed for the LBFGS_FFM object implementation. If you are NOT working with LBFGS_FFM, feel free to disregard it.

Value parameters

destination

MemorySegment that will receive the data from this LBFGSPrms instance. Must have been allocated using the memoryLayout MemoryLayout.

prm

the LBFGS Parameters

Attributes

def lbfgsMain(n: Int, x: VectorD, optimizationMethodHandles: OptimizationMethodHandlesFFM, instanceMemorySegment: MemorySegment, params: LBFGSPrms): LBFGSResults

L-BFGS main function FFM wrapper for the L-BFGS C library shared object implementation. Calls a C shared object library to perform the L-BFGS optimization that minimizes variables according to the parameters specified by the user.

L-BFGS main function FFM wrapper for the L-BFGS C library shared object implementation. Calls a C shared object library to perform the L-BFGS optimization that minimizes variables according to the parameters specified by the user.

Value parameters

instanceMemorySegment

MemorySegment with user data to be provided to the evaluate and progress methods. Can be set to MemorySegment.NULL if no user data is required on the evaluate or progress method calls. If not set to MemorySegment.NULL it must be encoded in the same MemoryLayout as the one expected by the implementations contained in the evaluate and progress methods.

n

The number of variables.

optimizationMethodHandles

OptimizationMethodHandlesFFM class providing the method handles for the evaluate and progress methods needed for performing the variable optimization.

params

LBFGSPrms class representing the parameters chosen to control the L-BFGS optimization. The default parameters used are the defaults of the LBFGSPrms constructor.

x

VectorD with the initial values of the variables.

Attributes

Returns

LBFGSResults Results for the L-BFGS optimization. In this implementation, if the objective function is never evaluated due to errors in the arguments from the method call, the finalFunctionValue returned will be Some(0). Also, this implementation is currently not capable of determining the lineSearchIncompleteResults value, which will always be set to None regardless of how the L-BFGS optimization terminates.

Concrete fields

val memoryLayout: StructLayout