Class SafeFunction

java.lang.Object
solvers.queueingnet.montecarloLogistic.numericalIntegration.SafeFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
LogisticFunctionBase, LogisticFunctionMS

public abstract class SafeFunction extends Object implements Function
Abstract class that implements the Function interface. Requires that dimensionality and the location of the point in the domain be enforced before a safe evaluation of the function is performed
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SafeFunction(int ndim)
    Initialized the SafeFunction object
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    checkInDomain(double[] point)
    Function that checks point in within the domain of the function
    protected void
    checkPoint(double[] point)
    Checks that the provided point has length equal the function domain dimensionality
    evaluate(double[] point)
    Implements the Function evaluate interface with a safe one
    protected abstract BigDecimal
    safeEvaluate(double[] point)
    The evaluation of the function, given that the point is within the domain

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface Function

    copy
  • Field Details

    • ndim

      protected final int ndim
  • Constructor Details

    • SafeFunction

      public SafeFunction(int ndim)
      Initialized the SafeFunction object
      Parameters:
      ndim - dimensionality of the function
  • Method Details

    • checkPoint

      protected void checkPoint(double[] point) throws InternalErrorException
      Checks that the provided point has length equal the function domain dimensionality
      Parameters:
      point - Point to be checked
      Throws:
      InternalErrorException - When point is invalid
    • checkInDomain

      protected abstract void checkInDomain(double[] point) throws InternalErrorException
      Function that checks point in within the domain of the function
      Parameters:
      point - Point to be checked
      Throws:
      InternalErrorException - When point is invalid
    • evaluate

      public BigDecimal evaluate(double[] point) throws InternalErrorException
      Implements the Function evaluate interface with a safe one
      Specified by:
      evaluate in interface Function
      Parameters:
      point - Array representing point to be evaluated
      Returns:
      Function value at point
      Throws:
      InternalErrorException - When point is not in function domain
    • safeEvaluate

      protected abstract BigDecimal safeEvaluate(double[] point) throws InternalErrorException
      The evaluation of the function, given that the point is within the domain
      Parameters:
      point - Array representing point to be evaluated
      Returns:
      Function value at point
      Throws:
      InternalErrorException