Examples of exactClone()


Examples of mikera.matrixx.AMatrix.exactClone()

    AMatrix m=Matrixx.createSparse(2000000,2000000);
    testBigStats(m);
    testBigStats(m.getTranspose());
   
    m.set(3,4,7.0);
    assertEquals(m,m.exactClone());
   
    AMatrix mt=m.getTranspose();
    assertEquals(m.getTranspose(),mt);
   
    assertTrue(m.density()<0.0001);
View Full Code Here

Examples of mikera.matrixx.impl.UpperTriangularMatrix.exactClone()

public class TestTriangular {

  @Test
  public void testClone() {
    UpperTriangularMatrix u=UpperTriangularMatrix.createFrom(Matrixx.createRandomSquareMatrix(3));
    assertEquals(u,u.exactClone());
   
    assertTrue(u.isUpperTriangular());
    assertTrue(u.getTranspose().isLowerTriangular());
  }
View Full Code Here

Examples of mikera.vectorz.AVector.exactClone()

  public SparseColumnMatrix exactClone() {
    SparseColumnMatrix result= new SparseColumnMatrix(rows,cols);
        for (int i = 0; i < cols; ++i) {
      AVector col = unsafeGetVec(i);
      if (col != null)
          result.replaceColumn(i, col.exactClone());
    }
    return result;
  }
 
  @Override
View Full Code Here

Examples of mikera.vectorz.AVector.exactClone()

  public SparseRowMatrix exactClone() {
    SparseRowMatrix result = new SparseRowMatrix(rows, cols);
        for (int i = 0; i < rows; ++i) {
      AVector row = unsafeGetVec(i);
      if (row != null)
                result.replaceRow(i, row.exactClone());
    }
    return result;
  }
 
  @Override
View Full Code Here

Examples of mikera.vectorz.Vector.exactClone()

    assertEquals(2.0, j.get(10),0.0)
  }
 
  @Test public void testJoinedVectorAdd() {
    Vector v=Vector.of(0,1,2,3,4,5,6,7,8,9);
    AVector j=v.clone().join(v.exactClone());
   
    j.add(5,v);
   
    assertEquals(4.0,j.get(4),0.0);
    assertEquals(13.0,j.get(9),0.0);
View Full Code Here

Examples of mikera.vectorz.Vector.exactClone()

    assertEquals(3,jabc.numArrays());
  }
 
  @Test public void testJoinedVector3Add() {
    Vector v=Vector.of(0,1,2,3,4);
    AVector j=v.clone().join(v.exactClone());
    assertEquals(JoinedArrayVector.class,j.getClass());
   
    j.add(4,Vector3.of(10,20,30));
   
    assertEquals(3.0,j.get(3),0.0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.