Function SCIPcalcCliquePartition

Source
pub unsafe extern "C" fn SCIPcalcCliquePartition(
    scip: *mut SCIP,
    vars: *mut *mut SCIP_VAR,
    nvars: c_int,
    cliquepartition: *mut c_int,
    ncliques: *mut c_int,
) -> SCIP_RETCODE
Expand description

calculates a partition of the given set of binary variables into cliques; takes into account independent clique components

The algorithm performs the following steps:

  • recomputes connected components of the clique table, if necessary
  • computes a clique partition for every connected component greedily.
  • relabels the resulting clique partition such that it satisfies the description below

afterwards the output array contains one value for each variable, such that two variables got the same value iff they were assigned to the same clique; the first variable is always assigned to clique 0, and a variable can only be assigned to clique i if at least one of the preceding variables was assigned to clique i-1; for each clique at most 1 variables can be set to TRUE in a feasible solution;

@return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref SCIP_Retcode “SCIP_RETCODE” for a complete list of error codes.

@pre This method can be called if @p scip is in one of the following stages: - \ref SCIP_STAGE_INITPRESOLVE - \ref SCIP_STAGE_PRESOLVING - \ref SCIP_STAGE_EXITPRESOLVE - \ref SCIP_STAGE_PRESOLVED - \ref SCIP_STAGE_SOLVING