c

scalation.minima

IntegerGoldenSectionLS

class IntegerGoldenSectionLS extends AnyRef

The IntegerGoldenSectionLS class performs a line search on 'f(x)' to find a minimal value for 'f'. It requires no derivatives and only one functional evaluation per iteration. A search is conducted from 'x1' (often 0) to 'xmax'. A guess for 'xmax' must be given, but can be made larger during the expansion phase, that occurs before the recursive golden section search is called. It works on scalar functions

See also

IntegerGoldenSectionLSTest2.

IntegerGoldenSectionLSTest. If starting with a vector function 'f(x)', simply define a new function 'g(y) = x0 + direction * y'.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IntegerGoldenSectionLS
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IntegerGoldenSectionLS(f: (Int) ⇒ Double)

    f

    the scalar objective function to minimize

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def gsection(left: Boolean, x1: Int, x2: Int, x3: Int, f2: Double): Int

    A recursive golden section search requiring only one functional evaluation per call.

    A recursive golden section search requiring only one functional evaluation per call. It works by comparing two center points x2 (given) and x4 computed.

    left

    whether to search left (true) or right (false) side of last interval

    x1

    the left-most point

    x2

    the center point (.618 across for left and .382 across for right)

    x3

    the right-most point

    f2

    the functional value for the x2 center point

  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  16. def printGolden(): Unit

    Print the golden ratio and the golden section.

  17. def solve(xmax: Int = 5, x1: Int = 1): Int

    Perform a Line Search (LS) using the Integer Golden Search Algorithm.

    Perform a Line Search (LS) using the Integer Golden Search Algorithm. Two phases are used: an expansion phase (moving the end-point) to find a down-up pattern, followed by a traditional golden section search.

    xmax

    a rough guess for the right end-point of the line search

    x1

    the left (smallest) anchor point for the search (usually 1)

  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped