gsigetbalstruct function

An auxiliary functions to compute user-defined ilr and ipt transforms.