private void calcL2Norms()
{
int i;
float[][] wfs = new float[2][];
double acc;
float l2n;
// While we are not done on the root element, compute basis functions
// and assign L2-norm
while (l2Norm < 0f)
{
calcBasisWaveForms(wfs);
// Compute line L2-norm, which is the product of the line
// and column L2-norms
acc = 0.0;
for (i = wfs[0].Length - 1; i >= 0; i--)
{
acc += wfs[0][i] * wfs[0][i];
}
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
l2n = (float) System.Math.Sqrt(acc);
// Compute column L2-norm
acc = 0.0;
for (i = wfs[1].Length - 1; i >= 0; i--)
{
acc += wfs[1][i] * wfs[1][i];
}
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
l2n *= (float) System.Math.Sqrt(acc);
// Release waveforms
wfs[0] = null;
wfs[1] = null;
// Assign the value
assignL2Norm(l2n);
}
}