Usage
getSignCorrection(r, A1, C1, eps, A2, C2, epsvec, flip, swap, w, swapIsOneFlip, maxActions, maxCombinations)
Arguments
r
The numerical record to correct
C1
Constant vector for equalities
eps
Tolerance for equality-checking
C2
Constant vector for inequalities
epsvec
Vector to check against. (.Machine.double.eps
for >
inequalities, otherwise 0.)
flip
indices in r
, where r may be sign-flipped
swap
$n\times2$ matrix with indices in r
, each row indicating a possible value swap.
w
weight vector of length(flips)+nrow(swaps)
if swapIsOneFlip==TRUE
, otherwise of length(r)
swapIsOneFlip
logical. If TRUE
, weights are assigned to each flip or swap action. If FALSE
weights are assigned to every changed variable.
maxActions
Maximum number of flips+swaps
to try.
maxCombinations
the maximum number of flip/swap combinations to try. See the description in correctSigns