public PermutedMatrix(AMatrix source, Index rowPermutations, Index columnPermutations) {
super(rowPermutations.length(),columnPermutations.length(),source);
if (source instanceof PermutedMatrix) {
PermutedMatrix pm=(PermutedMatrix)source;
Index rp=pm.rowPermutations.clone();
rp.permute(rowPermutations);
rowPermutations=rp;
Index cp=pm.columnPermutations.clone();
rp.permute(columnPermutations);
columnPermutations=cp;
source=pm.source;
}