public class SOCPMaximumLoan extends SOCPPortfolioConstraint
SOCPPortfolioConstraint.ConstraintViolationException, SOCPPortfolioConstraint.Variable
Function.EvaluationException
Constructor and Description |
---|
SOCPMaximumLoan(Vector w_0,
Vector l)
Constructs a maximum loan constraint.
|
SOCPMaximumLoan(Vector w_0,
Vector l,
double epsilon)
Constructs a maximum loan constraint.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areAllConstraintsSatisfied(Vector y)
Checks whether all SOCP constraints represented by this portfolio
constraint are satisfied.
|
int |
dimensionOfDomain()
Get the number of variables the function has.
|
int |
dimensionOfRange()
Get the dimension of the range space of the function.
|
Double |
evaluate(Vector y)
Evaluate the function f at x, where x is from the domain.
|
getVariables, iterator, newSOCPGeneralConstraints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public SOCPMaximumLoan(Vector w_0, Vector l, double epsilon)
w_0
- the initial positionl
- the maximum loanepsilon
- a precision parameter: when a number |x| ≤ ε,
it is considered 0public boolean areAllConstraintsSatisfied(Vector y) throws SOCPPortfolioConstraint.ConstraintViolationException
SOCPPortfolioConstraint
areAllConstraintsSatisfied
in class SOCPPortfolioConstraint
y
- a portfolio solution or allocation; the asset weightstrue
if and only if all SOCP constraints are satisfiedSOCPPortfolioConstraint.ConstraintViolationException
public Double evaluate(Vector y)
Function
y
- xpublic int dimensionOfDomain()
Function
public int dimensionOfRange()
Function
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.