| calc.sdcProblem {sdcTable} | R Documentation |
perform calculations on sdcProblem-objects depending on argument type
Description
perform calculations on sdcProblem-objects depending on argument type
Usage
calc.sdcProblem(object, type, input)
## S4 method for signature 'sdcProblem,character,list'
calc.sdcProblem(object, type, input)
Arguments
object |
an object of class |
type |
a character vector of length 1 defining what to calculate|return|modify. Allowed types are: |
rule.freq: modify suppression status within
objectaccording to frequency suppression ruleheuristicSolution: obtain a heuristic (greedy) solution to the problem defined by
objectcutAndBranch: solve a secondary cell suppression problem defined by
objectusing cut and branchanonWorker: is used to solve the suppression problem depending on information provided with argument
inputghmiter: solve a secondary cell suppression problem defined by
objectusing hypercube algorithmpreprocess: perform a preprocess procedure by trying to identify primary suppressed cells that are already protected due to other primary suppressed cells
cellID: find index of cell defined by information provided with argument
inputfinalize: create an object of class
safeObjghmiter.diagObj: calculate codes required to identify diagonal cells given a valid cell code - used for ghmiter-algorithm only
ghmiter.calcInformation: calculate information for quaders identified by diagonal indices - used for ghmiter-algorithm only
ghmiter.suppressQuader: suppress a quader based on indices
ghmiter.selectQuader: select a quader for suppression depending on information provided with argument
input- used for ghmiter-algorithm onlyghmiter.suppressAdditionalQuader: select and suppress an additional quader (if required) based on information provided with argument
input- used for ghmiter-algorithm onlycontributingIndices: calculate indices within the current problem that contribute to a given cell
reduceProblem: reduce the problem given by
objectusing a vector of indicesgenStructuralCuts: calculate cuts that are absolute necessary for a valid solution of the secondary cell suppression problem
input |
a list depending on argument |
a list (typically generated using genParaObj()) specifying parameters for primary cell suppression if argument
typematches 'rule.freq'a list if argument
typematches 'heuristicSolution' having the following elements:element 'aProb': an object of class
linProbdefining the attacker's problemelement 'validCuts': an object of class
cutListrepresenting a list of constraintselement 'solver': a character vector of length 1 specifying a solver to use
element 'verbose': a logical vector of length 1 setting if verbose output is desired
a list (typically generated using genParaObj()) specifying parameters for the secondary cell suppression problem if argument
typematches 'cutAndBranch', 'anonWorker', 'ghmiter', 'preprocess'a list of length 3 if argument
typematches 'cellID' having following elementsfirst element: character vector specifying variable names that need to exist in slot 'dimInfo' of
objectsecond element: character vector specifying codes for each variable that define a specific table cell
third element: logical vector of length 1 with TRUE setting verbosity and FALSE to turn verbose output off
a list of length 3 if argument
typematches 'ghmiter.diagObj' having following elementsfirst element: numeric vector of length 1
second element: a list with as many elements as dimensional variables have been specified and each element being a character vector of dimension-variable specific codes
third element: logical vector of length 1 defining if diagonal indices with frequency == 0 should be allowed or not
a list of length 4 if argument
typematches 'ghmiter.calcInformation' having following elementsfirst element: a list object typically generated with method
calc.sdcProblemand type=='ghmiter.diagObj'second element: a list with as many elements as dimensional variables have been specified and each element being a character vector of dimension-variable specific codes
third element: numeric vector of length 1 specifying a desired protection level
fourth element: logical vector of length 1 defining if quader containing empty cells should be allowed or not
a list of length 1 if argument
typematches 'ghmiter.suppressQuader' having following elementfirst element: numeric vector of indices that should be suppressed
a list of length 2 if argument
typematches 'ghmiter.selectQuader' having following elementsfirst element: a list object typically generated with method
calc.sdcProblemand type=='ghmiter.calcInformation'second element: a list (typically generated using genParaObj())
a list of length 4 if argument
typematches 'ghmiter.suppressAdditionalQuader' having following elementsfirst element: a list object typically generated with method
calc.sdcProblemand type=='ghmiter.diagObj'second element: a list object typically generated with method
calc.sdcProblemand type=='ghmiter.calcInformation'third element: a list object typically generated with method
calc.sdcProblemand type=='ghmiter.selectQuader'fourth element: a list (typically generated using genParaObj())
a list of length 1 if argument
typematches 'contributingIndices' having following elementfirst element: character vector of length 1 being an ID for which contributing indices should be calculated
a list of length 1 if argument
typematches 'reduceProblem' having following elementfirst element: numeric vector defining indices of cells that should be kept in the reduced problem
an empty list if argument
typematches 'genStructuralCuts'
Value
information from objects of class sdcProblem depending on argument type
an object of class
sdcProblemif argumenttypematches 'rule.freq', 'cutAndBranch', 'anonWorker', 'ghmiter', 'ghmiter.supressQuader', 'ghmiter.suppressAdditionalQuader' or 'reduceProblem'a numeric vector with elements being 0 or 1 if argument
typematches 'heuristicSolution'a list if argument
typematches 'preprocess' having following elements:element 'sdcProblem': an object of class
sdcProblemelement 'aProb': an object of class
linProbelement 'validCuts': an object of class
cutList
a numeric vector of length 1 specifying the index of the cell of interest if argument
typematches 'cellID'an object of class
safeObjif argumenttypematches 'finalize'a list if argument
typematches 'ghmiter.diagObj' having following elements:element 'cellToProtect': character vector of length 1 defining the ID of the cell to protect
element 'indToProtect': numeric vector of length 1 defining the index of the cell to protect
element 'diagIndices': numeric vector defining indices of possible cells defining cubes
a list containing information about each quader that could possibly be suppressed if argument
typematches 'ghmiter.calcInformation'a list containing information about a single quader that should be suppressed if argument
typematches 'ghmiter.selectQuader'a numeric vector with indices that contribute to the desired table cell if argument
typematches 'contributingIndices'an object of class
cutListif argumenttypematches 'genStructuralCuts'
Note
internal function
Author(s)
Bernhard Meindl bernhard.meindl@statistik.gv.at