---
name: "sc_LineOpt"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_LineOpt"
---

# sc\_LineOpt(3)

The LineOpt abstract class is used to perform one dimensional optimizations.

## NAME

sc::LineOpt - The **LineOpt** abstract class is used to perform one dimensional optimizations.

## SYNOPSIS

`#include <opt.h>`

Inherits **sc::Optimize**.

Inherited by **sc::Backtrack**, and **sc::MCSearch**.

### Public Member Functions

**LineOpt** (**StateIn** &)\
 **LineOpt** (const **Ref**\< **KeyVal** \> &)\
 void **save\_data\_state** (**StateOut** &)\
 Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them.  virtual void **init** (**RefSCVector** &direction)\
 Initializes the line search object.  virtual void **init** (**RefSCVector** &direction, **Ref**\< **Function** \> **function**)\
 Initializes the line search object.  void **apply\_transform** (const **Ref**\< **NonlinearTransform** \> &)\
 Applies a nonlinear transform.  double **decrease\_factor** ()\
 Returns factor for sufficient decrease test.  double **set\_decrease\_factor** (double factor)\
 Sets factor for sufficient decrease test.

### Protected Member Functions

int **sufficient\_decrease** (**RefSCVector** &step)\

### Protected Attributes

double **decrease\_factor\_**\
 **RefSCVector** **initial\_x\_**\
 double **initial\_value\_**\
 **RefSCVector** **initial\_grad\_**\
 **RefSCVector** **search\_direction\_**\
 **Ref**\< **Function** \> **function\_**\

### Additional Inherited Members

## Detailed Description

The **LineOpt** abstract class is used to perform one dimensional optimizations.

## Member Function Documentation

### void sc::LineOpt::apply\_transform (const Ref\< NonlinearTransform \> &)` [virtual]`

Applies a nonlinear transform.

Reimplemented from **sc::Optimize**.

### virtual void sc::LineOpt::init (RefSCVector & direction)` [virtual]`

Initializes the line search object. Argument is a search direction. Use of this method assumes the **Optimize** base class already has a function object (got it from a keyval or elsewhere).

Reimplemented in **sc::MCSearch**.

### virtual void sc::LineOpt::init (RefSCVector & direction, Ref\< Function \> function)` [virtual]`

Initializes the line search object. First argument is a search direction, second argument is a function object to optimize. Use this method when a function must be passed to the **Optimize** base class.

Reimplemented in **sc::MCSearch**.

### void sc::LineOpt::save\_data\_state (StateOut &)` [virtual]`

Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them. This must be implemented by the derived class if the class has data.

Reimplemented from **sc::Optimize**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
