Author: bpoussin Date: 2014-04-10 20:33:35 +0200 (Thu, 10 Apr 2014) New Revision: 475 Url: http://forge.nuiton.org/projects/nuiton-matrix/repository/revisions/475 Log: if 2 LazyVector don't have same size, don't use lazy feature for paste Modified: trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/LazyVector.java Modified: trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/LazyVector.java =================================================================== --- trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/LazyVector.java 2014-04-10 18:32:50 UTC (rev 474) +++ trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/LazyVector.java 2014-04-10 18:33:35 UTC (rev 475) @@ -100,7 +100,7 @@ @Override public void paste(Vector source) { - if (!isInitBackend && source instanceof LazyVector) { + if (!isInitBackend && source instanceof LazyVector && ((LazyVector)source).size() == size()) { LazyVector l = ((LazyVector)source); l.users.incrementAndGet();