H
harryos
i am wondering if the following array operations can be done using any
Matrix classes(colt or jama).If anyone can help ,pls advise
public double[][] arrayOp(){
double[]evalsub=new double[]{3.4,2.3,1.2};
double[][] weights=new double[][]{
{1.2,1.3,1.4},
{2.2,2.3,2.4},
{3.2,3.3,3.4},
{4.2,4.3,4.4}
};
double[][] temp=new double[weights.length][weights[0].length];
for(int i=0;i<weights.length;i++){
for(int j=0;j<evalsub.length;j++){
temp[j]=weights[j]*evalsub[j];
}
}
return temp;
}
Matrix classes(colt or jama).If anyone can help ,pls advise
public double[][] arrayOp(){
double[]evalsub=new double[]{3.4,2.3,1.2};
double[][] weights=new double[][]{
{1.2,1.3,1.4},
{2.2,2.3,2.4},
{3.2,3.3,3.4},
{4.2,4.3,4.4}
};
double[][] temp=new double[weights.length][weights[0].length];
for(int i=0;i<weights.length;i++){
for(int j=0;j<evalsub.length;j++){
temp[j]=weights[j]*evalsub[j];
}
}
return temp;
}