Page 484 - Advanced Mine Ventilation
P. 484
Appendix C: Ventilation Network Analyzer in Cþþ With Input and Output 453
if(np-2 <¼ 0)
{
1;
nd[l] ¼
2;
n1 ¼
if(np-1 < 0)
{
exit(0);
}
else if (np-1 ¼¼ 0)
{
c[l][1] ¼ fx[1];
c[l][2] ¼ 0;
printc(l);
}
else
{
if(x[1] ¼¼ x[2])
{
exit(0);
}
else
{
c[l][1] ¼ (fx[1] * x[2] - fx[2] * x[1]) / (x[2] - x
[1]);
c[l][2] ¼ (fx[2] - fx[1]) / (x[2] - x[1]);
printc(l);
}
}
}
else
{
dsq ¼ 0;
for(int j¼1; j<¼ np; jþþ)
{
dsq ¼ dsq þ fx[j] * fx[j];
p[1][j] ¼ 0;
p[2][j] ¼ 1;
}
w[1] ¼ np;
beta[1] ¼ 0;
(np-7 >¼ 0) ? (n1 ¼ 6) : (n1 ¼ np-1);

