Detailed Description
internal methods for branching and inference history
Definition in file history.h.
#include "scip/def.h"#include "blockmemshell/memory.h"#include "scip/type_retcode.h"#include "scip/type_set.h"#include "scip/type_history.h"Go to the source code of this file.
Function Documentation
◆ SCIPhistoryCreate()
| SCIP_RETCODE SCIPhistoryCreate | ( | SCIP_HISTORY ** | history, |
| BMS_BLKMEM * | blkmem | ||
| ) |
creates an empty history entry
- Parameters
-
history pointer to store branching and inference history blkmem block memory
Definition at line 51 of file history.c.
References BMSallocBlockMemory, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPhistoryReset().
Referenced by SCIPreoptUpdateVarHistory(), SCIPstatCreate(), SCIPvaluehistoryFind(), and varCreate().
◆ SCIPhistoryFree()
| void SCIPhistoryFree | ( | SCIP_HISTORY ** | history, |
| BMS_BLKMEM * | blkmem | ||
| ) |
frees a history entry
- Parameters
-
history pointer to branching and inference history blkmem block memory
Definition at line 66 of file history.c.
References BMSfreeBlockMemory, and NULL.
Referenced by SCIPreoptFree(), SCIPstatFree(), SCIPvaluehistoryFree(), and varFree().
◆ SCIPhistoryReset()
| void SCIPhistoryReset | ( | SCIP_HISTORY * | history | ) |
resets history entry to zero
- Parameters
-
history branching and inference history
Definition at line 78 of file history.c.
References SCIP_History::ancpscostcount, SCIP_History::ancpscostweightedmean, SCIP_History::balance, SCIP_History::branchdepthsum, SCIP_History::conflengthsum, SCIP_History::cutoffsum, FALSE, SCIP_History::gmieff, SCIP_History::gmieffsum, SCIP_History::inferencesum, SCIP_History::nactiveconflicts, SCIP_History::nbranchings, SCIP_History::ngmi, NULL, SCIP_History::pscostcount, SCIP_History::pscostvariance, SCIP_History::pscostweightedmean, SCIP_History::ratio, SCIP_History::ratiovalid, and SCIP_History::vsids.
Referenced by SCIPhistoryCreate(), SCIPreoptUpdateVarHistory(), SCIPstatReset(), SCIPstatResetCurrentRun(), SCIPvarAggregate(), SCIPvarAggregateExact(), SCIPvarFix(), SCIPvarFixExact(), and SCIPvarInitSolve().
◆ SCIPhistoryUnite()
| void SCIPhistoryUnite | ( | SCIP_HISTORY * | history, |
| SCIP_HISTORY * | addhistory, | ||
| SCIP_Bool | switcheddirs | ||
| ) |
unites two history entries by adding the values of the second one to the first one
- Parameters
-
history branching and inference history addhistory history values to add to history switcheddirs should the history entries be united with switched directories
Definition at line 117 of file history.c.
References SCIP_History::ancpscostcount, SCIP_History::ancpscostweightedmean, SCIP_History::branchdepthsum, SCIP_History::conflengthsum, SCIP_History::cutoffsum, SCIP_History::inferencesum, MAX, SCIP_History::nactiveconflicts, SCIP_History::nbranchings, NULL, SCIP_History::pscostcount, SCIP_History::pscostvariance, SCIP_History::pscostweightedmean, SCIP_Real, and SCIP_History::vsids.
Referenced by SCIPreoptUpdateVarHistory(), SCIPvarAggregate(), SCIPvarAggregateExact(), SCIPvarMergeHistories(), SCIPvarSetHistory(), and SCIPvarTransform().
◆ SCIPhistoryUpdatePseudocost()
| void SCIPhistoryUpdatePseudocost | ( | SCIP_HISTORY * | history, |
| SCIP_SET * | set, | ||
| SCIP_Real | solvaldelta, | ||
| SCIP_Real | objdelta, | ||
| SCIP_Real | weight | ||
| ) |
updates the pseudo costs for a change of "solvaldelta" in the variable's LP solution value and a change of "objdelta" in the LP's objective value
- Parameters
-
history branching and inference history set global SCIP settings solvaldelta difference of variable's new LP value - old LP value objdelta difference of new LP's objective value - old LP's objective value weight weight of this update in pseudo cost sum (added to pscostcount)
Definition at line 191 of file history.c.
References eps, MAX, NULL, SCIP_History::pscostcount, SCIP_History::pscostvariance, SCIP_History::pscostweightedmean, REALABS, SCIP_Real, SCIPsetDebugMsg, SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetPseudocostdelta(), and SCIPsetPseudocosteps().
Referenced by SCIPvarUpdatePseudocost().
◆ SCIPhistoryUpdateAncPseudocost()
| void SCIPhistoryUpdateAncPseudocost | ( | SCIP_HISTORY * | history, |
| SCIP_SET * | set, | ||
| SCIP_Real | solvaldelta, | ||
| SCIP_Real | objdelta, | ||
| SCIP_Real | weight | ||
| ) |
updates the ancestral pseudo costs for a change of "solvaldelta" in the variable's LP solution value and a change of "objdelta" in the LP's objective value
- Parameters
-
history branching and inference history set global SCIP settings solvaldelta difference of variable's new LP value - old LP value objdelta difference of new LP's objective value - old LP's objective value weight weight of this update in discounted pseudo cost sum (added to pscostcount)
Definition at line 255 of file history.c.
References SCIP_History::ancpscostcount, SCIP_History::ancpscostweightedmean, eps, MAX, NULL, REALABS, SCIP_Real, SCIPsetDebugMsg, SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetPseudocostdelta(), and SCIPsetPseudocosteps().
Referenced by SCIPvarUpdateAncPseudocost().
◆ SCIPbranchdirOpposite()
| SCIP_BRANCHDIR SCIPbranchdirOpposite | ( | SCIP_BRANCHDIR | dir | ) |
returns the opposite direction of the given branching direction
- Parameters
-
dir branching direction
Definition at line 520 of file history.c.
References SCIP_BRANCHDIR_AUTO, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPvarAggregate(), SCIPvarAggregateExact(), SCIPvarChgBranchDirection(), SCIPvarGetAncPseudocostCountCurrentRun(), SCIPvarGetAvgBranchdepth(), SCIPvarGetAvgConflictlength(), SCIPvarGetAvgConflictlengthCurrentRun(), SCIPvarGetAvgCutoffs(), SCIPvarGetAvgCutoffsCurrentRun(), SCIPvarGetAvgInferences(), SCIPvarGetAvgInferencesCurrentRun(), SCIPvarGetCutoffSum(), SCIPvarGetCutoffSumCurrentRun(), SCIPvarGetInferenceSum(), SCIPvarGetInferenceSumCurrentRun(), SCIPvarGetNActiveConflicts(), SCIPvarGetNActiveConflictsCurrentRun(), SCIPvarGetNBranchings(), SCIPvarGetNBranchingsCurrentRun(), SCIPvarGetPseudocostCount(), SCIPvarGetPseudocostCountCurrentRun(), SCIPvarGetPseudocostVariance(), SCIPvarGetVSIDS_rec(), SCIPvarGetVSIDSCurrentRun(), SCIPvarIncCutoffSum(), SCIPvarIncInferenceSum(), SCIPvarIncNActiveConflicts(), SCIPvarIncNBranchings(), SCIPvarIncVSIDS(), SCIPvarMultiaggregate(), SCIPvarMultiaggregateExact(), SCIPvarNegate(), and varProcessChgBranchDirection().
◆ SCIPhistoryGetPseudocost()
| SCIP_Real SCIPhistoryGetPseudocost | ( | SCIP_HISTORY * | history, |
| SCIP_Real | solvaldelta | ||
| ) |
returns the expected dual gain for moving the corresponding variable by "solvaldelta"
- Parameters
-
history branching and inference history solvaldelta difference of variable's new LP value - old LP value
Definition at line 529 of file history.c.
References NULL, SCIP_History::pscostcount, and SCIP_History::pscostweightedmean.
Referenced by SCIPgetAvgDPseudocostScore(), SCIPgetAvgPseudocost(), SCIPgetAvgPseudocostCurrentRun(), SCIPgetAvgPseudocostScore(), SCIPgetAvgPseudocostScoreCurrentRun(), SCIPprintBranchingStatistics(), SCIPvarGetPseudocost(), and SCIPvarGetPseudocostCurrentRun().
◆ SCIPhistoryGetAncPseudocost()
| SCIP_Real SCIPhistoryGetAncPseudocost | ( | SCIP_HISTORY * | history, |
| SCIP_Real | solvaldelta | ||
| ) |
returns the expected ancestral dual gain for moving the corresponding variable by "solvaldelta"
- Parameters
-
history branching and inference history solvaldelta difference of variable's new LP value - old LP value
Definition at line 543 of file history.c.
References SCIP_History::ancpscostcount, SCIP_History::ancpscostweightedmean, and NULL.
Referenced by SCIPgetAvgDPseudocostScore(), and SCIPvarGetAncPseudocost().
◆ SCIPhistoryGetPseudocostVariance()
| SCIP_Real SCIPhistoryGetPseudocostVariance | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | direction | ||
| ) |
returns the variance of pseudo costs about the mean.
- Parameters
-
history branching and inference history direction direction of variable: 1 for upwards history, 0 for downwards history
Definition at line 557 of file history.c.
References NULL, SCIP_History::pscostcount, SCIP_History::pscostvariance, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, and SCIP_Real.
Referenced by SCIPgetPseudocostVariance(), SCIPprintBranchingStatistics(), and SCIPvarGetPseudocostVariance().
◆ SCIPhistoryGetPseudocostCount()
| SCIP_Real SCIPhistoryGetPseudocostCount | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
returns the (possible fractional) number of (partial) pseudo cost updates performed on this pseudo cost entry in the given branching direction
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards)
Definition at line 581 of file history.c.
References NULL, SCIP_History::pscostcount, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPgetAvgPseudocostCount(), SCIPgetAvgPseudocostCountCurrentRun(), SCIPgetPseudocostCount(), SCIPprintBranchingStatistics(), SCIPvarGetPseudocost(), SCIPvarGetPseudocostCount(), SCIPvarGetPseudocostCountCurrentRun(), and SCIPvarGetPseudocostCurrentRun().
◆ SCIPhistoryGetAncPseudocostCount()
| SCIP_Real SCIPhistoryGetAncPseudocostCount | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
returns the (possible fractional) number of (partial) ancestral pseudo cost updates performed on this pseudo cost entry in the given branching direction
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards)
Definition at line 596 of file history.c.
References SCIP_History::ancpscostcount, NULL, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPvarGetAncPseudocost(), and SCIPvarGetAncPseudocostCountCurrentRun().
◆ SCIPhistoryIsPseudocostEmpty()
| SCIP_Bool SCIPhistoryIsPseudocostEmpty | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
returns whether the pseudo cost entry is empty in the given branching direction (whether no value was added yet)
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards)
Definition at line 609 of file history.c.
References NULL, SCIP_History::pscostcount, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
◆ SCIPhistoryIsAncPseudocostEmpty()
| SCIP_Bool SCIPhistoryIsAncPseudocostEmpty | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
returns whether the ancestral pseudo cost entry is empty in the given branching direction (whether no value was added yet)
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards)
Definition at line 622 of file history.c.
References SCIP_History::ancpscostcount, NULL, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
◆ SCIPhistoryIncVSIDS()
| void SCIPhistoryIncVSIDS | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir, | ||
| SCIP_Real | weight | ||
| ) |
increases the conflict score of the history entry by the given weight
- Parameters
-
history branching and inference history dir branching direction weight weight of this update in conflict score
Definition at line 635 of file history.c.
References NULL, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, and SCIP_History::vsids.
Referenced by incVSIDS(), and SCIPvarIncVSIDS().
◆ SCIPhistoryScaleVSIDS()
| void SCIPhistoryScaleVSIDS | ( | SCIP_HISTORY * | history, |
| SCIP_Real | scalar | ||
| ) |
scales the conflict score values with the given scalar
- Parameters
-
history branching and inference history scalar scalar to multiply the conflict scores with
Definition at line 649 of file history.c.
References NULL, and SCIP_History::vsids.
Referenced by SCIPconflictInit(), SCIPvaluehistoryScaleVSIDS(), and SCIPvarScaleVSIDS().
◆ SCIPhistoryIncNActiveConflicts()
| void SCIPhistoryIncNActiveConflicts | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir, | ||
| SCIP_Real | length | ||
| ) |
increases the number of active conflicts by one and the overall length of the history entry by the given weight
- Parameters
-
history branching and inference history dir branching direction length length of the conflict
Definition at line 674 of file history.c.
References SCIP_History::conflengthsum, SCIP_History::nactiveconflicts, NULL, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPvarIncNActiveConflicts(), and updateStatistics().
◆ SCIPhistoryGetNActiveConflicts()
| SCIP_Longint SCIPhistoryGetNActiveConflicts | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
gets the number of active conflicts of the history entry
- Parameters
-
history branching and inference history dir branching direction
Definition at line 690 of file history.c.
References SCIP_History::nactiveconflicts, NULL, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPvarGetNActiveConflicts(), and SCIPvarGetNActiveConflictsCurrentRun().
◆ SCIPhistoryIncNBranchings()
| void SCIPhistoryIncNBranchings | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir, | ||
| int | depth | ||
| ) |
increases the number of branchings counter
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards) depth depth at which the bound change took place
Definition at line 716 of file history.c.
References SCIP_History::branchdepthsum, SCIP_History::nbranchings, NULL, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPreoptMergeVarHistory(), and SCIPvarIncNBranchings().
◆ SCIPhistoryIncInferenceSum()
| void SCIPhistoryIncInferenceSum | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir, | ||
| SCIP_Real | weight | ||
| ) |
increases the number of inferences counter
increases the number of inferences counter by a certain value
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards) weight weight of this update in inference score
Definition at line 732 of file history.c.
References SCIP_History::inferencesum, SCIP_History::nbranchings, NULL, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPreoptMergeVarHistory(), and SCIPvarIncInferenceSum().
◆ SCIPhistoryIncCutoffSum()
| void SCIPhistoryIncCutoffSum | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir, | ||
| SCIP_Real | weight | ||
| ) |
increases the number of cutoffs counter
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards) weight weight of this update in cutoff score
Definition at line 748 of file history.c.
References SCIP_History::cutoffsum, SCIP_History::nbranchings, NULL, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPreoptMergeVarHistory(), and SCIPvarIncCutoffSum().
◆ SCIPhistoryGetNBranchings()
| SCIP_Longint SCIPhistoryGetNBranchings | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
get number of branchings counter
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards)
Definition at line 764 of file history.c.
References SCIP_History::nbranchings, NULL, SCIP_BRANCHDIR_DOWNWARDS, and SCIP_BRANCHDIR_UPWARDS.
Referenced by SCIPcollectBranchingStatistics(), SCIPprintBranchingStatistics(), SCIPvarGetAvgCutoffs(), SCIPvarGetAvgCutoffsCurrentRun(), SCIPvarGetAvgInferences(), SCIPvarGetAvgInferencesCurrentRun(), SCIPvarGetNBranchings(), and SCIPvarGetNBranchingsCurrentRun().
◆ SCIPhistoryGetAvgInferences()
| SCIP_Real SCIPhistoryGetAvgInferences | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
returns the average number of inferences per branching
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards)
Definition at line 790 of file history.c.
References SCIP_History::inferencesum, SCIP_History::nbranchings, NULL, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, and SCIP_Real.
Referenced by SCIPgetAvgInferences(), SCIPgetAvgInferenceScore(), SCIPgetAvgInferenceScoreCurrentRun(), SCIPgetAvgInferencesCurrentRun(), SCIPgetVarAvgInferenceCutoffScore(), SCIPgetVarAvgInferenceCutoffScoreCurrentRun(), SCIPreoptMergeVarHistory(), SCIPvarGetAvgInferences(), and SCIPvarGetAvgInferencesCurrentRun().
◆ SCIPhistoryGetAvgCutoffs()
| SCIP_Real SCIPhistoryGetAvgCutoffs | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
returns the average number of cutoffs per branching
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards)
Definition at line 816 of file history.c.
References SCIP_History::cutoffsum, SCIP_History::nbranchings, NULL, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, and SCIP_Real.
Referenced by SCIPgetAvgCutoffs(), SCIPgetAvgCutoffScore(), SCIPgetAvgCutoffScoreCurrentRun(), SCIPgetAvgCutoffsCurrentRun(), SCIPreoptMergeVarHistory(), SCIPvarGetAvgCutoffs(), and SCIPvarGetAvgCutoffsCurrentRun().
◆ SCIPhistoryGetAvgBranchdepth()
| SCIP_Real SCIPhistoryGetAvgBranchdepth | ( | SCIP_HISTORY * | history, |
| SCIP_BRANCHDIR | dir | ||
| ) |
returns the average depth of bound changes due to branching
- Parameters
-
history branching and inference history dir branching direction (downwards, or upwards)
Definition at line 829 of file history.c.
References SCIP_History::branchdepthsum, SCIP_History::nbranchings, NULL, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, and SCIP_Real.
Referenced by SCIPvarGetAvgBranchdepth(), and SCIPvarGetAvgBranchdepthCurrentRun().
◆ SCIPhistoryIsRatioValid()
| SCIP_Bool SCIPhistoryIsRatioValid | ( | SCIP_HISTORY * | history | ) |
returns true if the given history contains a valid ratio
- Parameters
-
history branching and inference history
Definition at line 842 of file history.c.
References NULL, and SCIP_History::ratiovalid.
Referenced by computeVarRatio().
◆ SCIPhistoryGetLastRatio()
| SCIP_Real SCIPhistoryGetLastRatio | ( | SCIP_HISTORY * | history | ) |
returns the most recent ratio computed given the variable history
- Parameters
-
history branching and inference history
Definition at line 852 of file history.c.
References NULL, SCIP_History::ratio, and SCIP_History::ratiovalid.
Referenced by computeVarRatio().
◆ SCIPhistoryGetLastBalance()
| SCIP_Real SCIPhistoryGetLastBalance | ( | SCIP_HISTORY * | history | ) |
returns the most recent value of r/l used to compute this variable's ratio
- Parameters
-
history branching and inference history
Definition at line 863 of file history.c.
References SCIP_History::balance, NULL, and SCIP_History::ratiovalid.
Referenced by computeVarRatio().
◆ SCIPhistoryGetAvgGMIeff()
| SCIP_Real SCIPhistoryGetAvgGMIeff | ( | SCIP_HISTORY * | history | ) |
returns the average efficacy value for the GMI cut produced by this variable
- Parameters
-
history branching and inference history
Definition at line 874 of file history.c.
References SCIP_History::gmieffsum, SCIP_History::ngmi, and NULL.
Referenced by SCIPgetAvgGMIeff(), and SCIPvarGetAvgGMIScore().
◆ SCIPhistoryIncGMIeffSum()
| void SCIPhistoryIncGMIeffSum | ( | SCIP_HISTORY * | history, |
| SCIP_Real | gmieff | ||
| ) |
increases the average efficacy value for the GMI cut produced by this variable
- Parameters
-
history branching and inference history gmieff normalized efficacy value of a cut which will increase gmieff
Definition at line 884 of file history.c.
References SCIP_History::gmieffsum, SCIP_History::ngmi, and NULL.
Referenced by SCIPincAvgGMIeff(), and SCIPvarIncGMIeffSum().
◆ SCIPhistoryGetLastGMIeff()
| SCIP_Real SCIPhistoryGetLastGMIeff | ( | SCIP_HISTORY * | history | ) |
returns the most recent efficacy value for the GMI cut produced by this variable
- Parameters
-
history branching and inference history
Definition at line 897 of file history.c.
References SCIP_History::gmieff, and NULL.
Referenced by SCIPvarGetLastGMIScore().
◆ SCIPhistorySetLastGMIeff()
| void SCIPhistorySetLastGMIeff | ( | SCIP_HISTORY * | history, |
| SCIP_Real | gmieff | ||
| ) |
sets the new most recent efficacy value for the GMI cut produced by this variable
- Parameters
-
history branching and inference history gmieff Efficacy of GMI cut produced from simplex tableau row of this var
Definition at line 907 of file history.c.
References SCIP_History::gmieff, and NULL.
Referenced by SCIPvarSetLastGMIScore().
◆ SCIPhistorySetRatioHistory()
| void SCIPhistorySetRatioHistory | ( | SCIP_HISTORY * | history, |
| SCIP_Bool | valid, | ||
| SCIP_Real | ratio, | ||
| SCIP_Real | balance | ||
| ) |
sets the ratio history for a particular variable
- Parameters
-
history branching and inference history valid True iff the ratio computed is valid ratio Ratio of the characteristic polynomial with gains (1, rightgain/leftgain) balance The value of rightgain/leftgain
Definition at line 918 of file history.c.
References SCIP_History::balance, NULL, SCIP_History::ratio, and SCIP_History::ratiovalid.
Referenced by computeVarRatio().