% This function is part of the NMSM Pipeline, see file for full license.
%
% This function calculates the integrand for verification optimization.
%
% (struct, struct, struct) -> (2D matrix)
% Returns scaled integrand
function integrand = calcVerificationOptimizationIntegrand(values, ...
modeledValues, auxdata)
[costTermCalculations, allowedTypes] = ...
generateCostTermStruct("continuous", "VerificationOptimization");
integrand = calcTreatmentOptimizationCost( ...
costTermCalculations, allowedTypes, values, modeledValues, auxdata);
integrand = integrand ./ (auxdata.maxIntegral - auxdata.minIntegral);
integrand = integrand .^ 2;
end