|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.BuyTheElection.Solver
A Solver using a general Quadratic Programming approach. Given an N x M factor matrix of variable rows and factor columns, and a set of M targets, a N size array is returned which represents the minimum distance attainable between the target factors and the factor matrix, as detailed in:
_ m _ n
\ \ 2
min / ( / (rank[Issue] * Issues[Issue][Candidate] - target[Issue])
- Issue=1 - Candidate=1
- n
\
- / Rank[Issue] * alpha[Issue])
- Issue=1
Target Values and storage are submitted after the solver is kicked off, with actual values being submitted from within the objective function.
| Constructor Summary | |
Solver()
Creates a new "Solver". |
|
| Method Summary | |
static void |
main(java.lang.String[] args)
A few sanity checks. |
boolean |
setFactors(double[][] theseFactors)
Sets the Factors for the Optimization Problem. |
boolean |
setTargets(double[] theseTargets)
Sets the Targets for the Optimization Problem. |
double |
version()
Gets the Solver's version nnumber. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Solver()
| Method Detail |
public double version()
public boolean setTargets(double[] theseTargets)
public boolean setFactors(double[][] theseFactors)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||