Class SOCPLinearBlackList

    • Constructor Detail

      • SOCPLinearBlackList

        public SOCPLinearBlackList​(int nAssets,
                                   Collection<Integer> blacklist)
        Creates a blacklist constraint.
        Parameters:
        nAssets - the number of assets in the portfolio
        blacklist - the indices of the blacklisted asset
      • SOCPLinearBlackList

        public SOCPLinearBlackList​(int nAssets,
                                   Collection<Integer> blacklist,
                                   double epsilon)
        Creates a blacklist constraint.
        Parameters:
        nAssets - the number of assets in the portfolio
        blacklist - the indices of the blacklisted asset
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
    • Method Detail

      • evaluate

        public Double evaluate​(Vector x)
        Description copied from interface: Function
        Evaluate the function f at x, where x is from the domain.
        Parameters:
        x - x
        Returns:
        f(x)
      • dimensionOfDomain

        public int dimensionOfDomain()
        Description copied from interface: Function
        Get the number of variables the function has. For example, for a univariate function, the domain dimension is 1; for a bivariate function, the domain dimension is 2.
        Returns:
        the number of variables
      • dimensionOfRange

        public int dimensionOfRange()
        Description copied from interface: Function
        Get the dimension of the range space of the function. For example, for a Rn->Rm function, the dimension of the range is m.
        Returns:
        the dimension of the range