// System.out.printf(nstate[j] << " ";
}
// System.out.printf(endl;
pen.fillmatrix();
Dynpro dynpro = new Dynpro(){
public double cost(int j, int k, int i){
return pen.c[j][k][i];
}
};
v=dynpro.dynpro(nstate);
test0=cost(v[0],v[1],0)+cost(v[1],v[2],1)+cost(v[2],v[3],2)
+cost(v[3],v[4],3)+cost(v[4],v[5],4);
// for (j=0;j<NSTAGE;j++)
// System.out.printf(v[j] << " ";