git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1767 include d and e vectors in Matrix.copy()
[jalview.git]
/
src
/
jalview
/
math
/
Matrix.java
diff --git
a/src/jalview/math/Matrix.java
b/src/jalview/math/Matrix.java
index
b910a7e
..
804421b
100755
(executable)
--- a/
src/jalview/math/Matrix.java
+++ b/
src/jalview/math/Matrix.java
@@
-24,6
+24,7
@@
import jalview.util.Format;
import jalview.util.MessageManager;
import java.io.PrintStream;
import jalview.util.MessageManager;
import java.io.PrintStream;
+import java.util.Arrays;
/**
* A class to model rectangular matrices of double values and operations on them
/**
* A class to model rectangular matrices of double values and operations on them
@@
-215,7
+216,17
@@
public class Matrix implements MatrixI
System.arraycopy(value[i], 0, newmat[i], 0, value[i].length);
}
System.arraycopy(value[i], 0, newmat[i], 0, value[i].length);
}
- return new Matrix(newmat);
+ Matrix m = new Matrix(newmat);
+ if (this.d != null)
+ {
+ m.d = Arrays.copyOf(this.d, this.d.length);
+ }
+ if (this.e != null)
+ {
+ m.e = Arrays.copyOf(this.e, this.e.length);
+ }
+
+ return m;
}
/**
}
/**