Giter Club home page Giter Club logo

matrix-toolkits-java's People

Contributors

dhutchis avatar dozed avatar fommil avatar jbasilico avatar juhanicc avatar maxxkia avatar millardjn avatar randyp avatar zeeshanasghar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

matrix-toolkits-java's Issues

AbstractMatrix.rank1(double alpha, Vector x) ignores alpha

Original author: [email protected] (April 01, 2009 16:57:11)

What steps will reproduce the problem?
Calling AbstractMatrix.rank1(double alpha, Vector x), where alpha != 1,
results in an incorrect result. Example code:

import java.util.Arrays;

import no.uib.cipr.matrix.DenseMatrix;
import no.uib.cipr.matrix.DenseVector;

public class Rank1Broken {

public static void main(String[] args) {
    DenseVector v = new DenseVector(new double [] {1, 2, 3});

    // These two lines yield the same result -- good.
    DenseMatrix M1 = new DenseMatrix(3, 3);
    M1.rank1(1, v);
    DenseMatrix M2 = new DenseMatrix(3, 3);
    M2.rank1(1, v, v);
    if (!Arrays.equals(M1.getData(), M2.getData())) {
        throw new RuntimeException("M1 != M2");
    }

    // Setting alpha != 1 causes the above to break.
    // Specifically, matrix M3 now contains an invalid result 
    DenseMatrix M3 = new DenseMatrix(3, 3);
    M3.rank1(3, v);
    DenseMatrix M4 = new DenseMatrix(3, 3);
    M4.rank1(3, v, v);
    if (!Arrays.equals(M3.getData(), M4.getData())) {
        throw new RuntimeException("M3 != M4");
    }
}

}

What is the expected output? What do you see instead?
Matrix M3 should be identical to matrix M4. Instead, they are not equal,
as there is a bug in the rank1(double alpha, Vector x) method of
AbstractMatrix.

Changing the AbstractMatrix.rank1(double alpha, Vector x) behavior to the
following should fix the problem, e.g.:

// Old method
public Matrix rank1(double alpha, Vector x) {
    return rank1(1, x, x);
}

// Fixed method
public Matrix rank1(double alpha, Vector x) {
    return rank1(alpha, x, x);
}

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=12

offsets to power subarray vectors

now that we have offset support in netlib-java, we should consider a Vector implementation that takes an array, an offset, and a length, and behaves just like a DenseVector... including support from DenseVector and DenseMatrix for the BLAS routines.

We could potentially add similar support for "sub matrices", but that's probably a much rarer use case.

SVD.pseudoSolve

e.g. (in Scala)

def pseudoSolve(m: Matrix, b: Vector) = {
    val svd = SVD.factorize(m)
    val ps = new BandMatrix(m.numRows(), 0, 0)
    // calculate pseudo-inverse of sigma
    svd.getS.zipWithIndex.foreach { case (v, i) =>
        if (v > 0.001) ps.set(i, i, 1 / v)
    }
    val tmpA = new DenseVector(b.size())
    svd.getU.transMult(b, tmpA)
    val tmpB = new DenseVector(b.size())
    ps.mult(tmpA, tmpB)
    tmpA
    svd.getVt.transMult(tmpB, tmpA)
  }

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

fast sparse matrix construction

Original author: [email protected] (January 15, 2010 23:43:40)

I'd like to minimize the construction costs when loading
(many, largish) sparse matrices from data retrieved in
binary form from disk. I can store the data in an appropriate
representation, would it be reasonable to add constructors with
signatures like:

public CompColMatrix(int numRows, int numColumns,
int [] columnPointer, int [] rowIndex, double [] data);

or is there a better way?

BTW, would questions like this be better posed in a discussion group
somewhere?

Thanks!

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=20

New releases as compiled jar available

Hi Sam,

I noticed, that you have published a new release of mtj (and net-lib). Before you moved to github, you provided an easy-to-use (compiled) jar file of mtj (and net-lib). Is it possible, that you still create a compiled version of mtj (and net-lib) or, if a version is still available, can you give me a download link?

regards
Micha

Patches for QR Pivoting routines

Original author: rafael%[email protected] (November 12, 2008 21:20:13)

Hi all,

This is not actually a problem, I would like just to suggest to incorporate
in your project the patches found at:
http://developer.berlios.de/patch/?group_id=8855

I posted these patches in the ressim project site some time ago. The first
one contains a the QR factorization with pivoting and the second one is a
unit test for it.

With the best regards.

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=9

NoClassDefFoundError

After generating the mtj jar using maven , mtj-1.0.2-SNAPSHOT.jar , using it gives this class definition not found error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/github/fommil/netlib/BLAS
at no.uib.cipr.matrix.DenseMatrix.multAdd(DenseMatrix.java:306)
at no.uib.cipr.matrix.AbstractMatrix.mult(AbstractMatrix.java:317)
at no.uib.cipr.matrix.AbstractMatrix.mult(AbstractMatrix.java:313)

Caused by: java.lang.ClassNotFoundException: com.github.fommil.netlib.BLAS
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

Any suggestions

Serializable objects in MTJ

Original author: [email protected] (October 13, 2010 10:48:08)

What steps will reproduce the problem?

  1. Trying to save a MTJ matrix in a matlab context
  2. Or in general, trying to serialize an object containing MTJ matrices
    3.

What is the expected output? What do you see instead?

  • That the MTJ objects implements Serializable

What version of the product are you using? On what operating system?
0.9.12

Please provide any additional information below.
Previous versions implements this feature.

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=25

Creating a dense matrix with more than Integer.MAX_VALUE elements can cause strange errors

Original author: [email protected] (October 11, 2011 04:51:10)

What steps will reproduce the problem?
Create a dense m-by-n matrix where m*n > Integer.MAX_VALUE.
Sometimes this will create a negative array size exception.
Other times it will not fail until a call that iterates over m and n, which will result in an index out of bounds exception.

What is the expected output? What do you see instead?
A dense matrix cannot have more than Integer.MAX_VALUE elements in Java, since array sizes are represented using ints (signed with 32-bits). Thus, it should fail on creation rather than causing strange bugs later on.

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=32

MatrixVectorReader forgets to read the total size (numCols * numRows) when matrix is dense

Original author: [email protected] (December 22, 2010 21:05:14)

What steps will reproduce the problem?

  1. Make dense Matrix : mat = new DenseMatrix(new double[]{{1.1,1.2}, {1.3,1.4}})
  2. Write this to a file with a MtrixVectorWriter: writer = new MatrixVectorWriter(new BufferedWriter(new FileWriter(matrixFile))); writer.printMatrixSize(new MatrixSize(basis.numRows(), basis.numColumns(), basis.numColumns() * basis.numRows())); writer.printArray(mat.getData())
  3. Read the matrix: newMat = new DenseMatrix(new MatrixVectorReader(new FileReader(matrixFile)))

What is the expected output? What do you see instead?
I expected that newMat would be the same as mat. Instead, newMat will be the same as new DenseMatrix(new double[]{{4,1.1},{1.2,1.3}})
because when info.isDense(), MatrixVectorReader.readMatrixSize(info) forgets to read the third int that is the size of the matrix, and thus causes the first entry in the array to be that number, which is 4 in the above example. To remedy this, getInt() must be called once more; the value can be ignored.

What version of the product are you using? On what operating system?
The jar file is called mtj-0.9.12.jar
I'm using Windows XP x64 (2003)

Please provide any additional information below.
It's very possible I have an out-of-date jar file

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=26

BiCGstab: updating x before calling converged

Original author: [email protected] (February 28, 2011 02:25:07)

One of the calls to "converged" of the IterationMonitor in the solve method of BiCGstab provides an "x" that is not up-to-date. This is problematic for my purposes where I've created my own IterationMonitor that uses the "x" as well as "r" vectors to determine if proper convergence is reached. There is a simple solution I believe. The current code (version 0.9.13) has
...
if (iter.converged(s, x))
return x.add(alpha, phat);

        M.apply(s, shat);
        A.mult(shat, t);
        omega = t.dot(s) / t.dot(t);
        x.add(alpha, phat);

...

I'm suggesting that x is updated before calling converged. As far as I can tell, this shouldn't cause any problems.
...
x.add(alpha, phat); // update x first
if (iter.converged(s, x))
return x; //.add(alpha, phat);

        M.apply(s, shat);
        A.mult(shat, t);
        omega = t.dot(s) / t.dot(t);

//REMOVE: x.add(alpha, phat);
...

Thank you.

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=30

Failed to load implementation from

Hi,
I downloaded the "zip" file from git repo and then tried to build the project using maven.

I executed " mvn package" to build the project, while running the test cases it gives these WARNINGS:

T E S T S

Running no.uib.cipr.matrix.LowerSymmDenseMatrixTest
Sep 05, 2014 1:43:11 PM com.github.fommil.netlib.BLAS
WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS
Sep 05, 2014 1:43:11 PM com.github.fommil.netlib.BLAS
WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeRefBLAS
Sep 05, 2014 1:43:11 PM com.github.fommil.netlib.LAPACK
WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeSystemLAPACK
Sep 05, 2014 1:43:11 PM com.github.fommil.netlib.LAPACK
WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeRefLAPACK

[Other Test Cases Truncated]
Results :

Tests run: 2447, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.380 s
[INFO] Finished at: 2014-09-05T13:43:28+05:30
[INFO] Final Memory: 11M/292M
[INFO] ------------------------------------------------------------------------

How can I avoid these, since these are required for achieving best performance.
Thank You,
Amit.

Performance OSX vs. Linux

I am using MTJ in two amd64 environments: linux and OSX. I have my application in a single jar. When I run this jar on OSX the library is blazingly fast (I use only SymmDenseEVD.factorize for matrices of size ca. 2500), but on Linux it takes 10 times more time to compute the same thing.

Note that:

  • The Linux machine is much faster than my macbook air (AMD Opteron(TM) Processor 6234 vs. i5 1.8Ghz)
  • The native libraries are successfully loaded

    Oct 02, 2014 12:47:08 PM com.github.fommil.jni.JniLoader liberalLoad
    INFO: successfully loaded /tmp/jniloader7176148666719042216netlib-native_system-linux-x86_64.so

  • The performance on linux does not depend on whether I use Native, NativeRef or no native libraries at all

Is this behaviour expected or not? May I debug it somehow?

EDIT: I have checked on another Linux machine (with inteli i7) and it works as quickly as on OSX. Could this bad performance related to the CPU vendor (AMD)?

NoClassDefFoundError exception on MTJ-N with maven

Hi,

I am trying to arrange a benchmark and I need to include MTJ-N to prove it is faster than other libraries when working with big matrices. I am trying to deploy a simple application in ubuntu from the command line (An amazon EC2 instance). When I try to execute my application (which for now makes a simple multiplication), a NoClassDefFoundError exception is thrown. I am not an expert on this area, so I might be missing something.

I would appreciate if you could provide help to solve this issue of mine. The following are the steps that ended causing the crash. I would like to point I have followed the tutorial provided in the readme of MTJ (http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html):

1st -> Creation of my application

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=MTJapp -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

2nd -> Build project

mvn package

3rd -> Run application

java -cp target/MTJapp-1.0-SNAPSHOT.jar mtj.MTJ

When I execute the problem, the following error occurs:

ubuntu@ip-10-75-135-32:~/MTJ/MTJApp$ java -cp target/MTJApp-1.0-SNAPSHOT.jar mtj.MTJ 10 10 10 r.txt multiplication true
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
        at mtj.MTJ.runOperation(MTJ.java:42)
        at mtj.MTJ.main(MTJ.java:99)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 2 more

My pom.xml dependencies as for now:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>mtj</groupId>
  <artifactId>MTJApp</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>MTJApp</name>
  <url>http://maven.apache.org</url>
  <build>
        <plugins>
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>3.1</version>
           <configuration>
              <source>1.7</source>
              <target>1.7</target>
           </configuration>
        </plugin>
        </plugins>
  </build>
  <dependencies>
        <dependency>
            <groupId>com.googlecode.matrix-toolkits-java</groupId>
            <artifactId>mtj</artifactId>
            <version>1.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.github.fommil.netlib</groupId>
            <artifactId>all</artifactId>
            <version>1.1.2</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.12.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.fommil</groupId>
            <artifactId>java-logging</artifactId>
            <version>1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>16.0.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>2.3</version>
            <scope>test</scope>
        </dependency>
  </dependencies>
</project>

And the following is my simple matrix multiplication application:

import no.uib.cipr.matrix.Matrix;
import no.uib.cipr.matrix.Matrices;
import no.uib.cipr.matrix.DenseMatrix;

public class Multiplication{

    public Multiplication(){}

    public void run(){
                Matrix A = Matrices.random(10, 10);
                Matrix B = Matrices.random(10, 10);

                DenseMatrix C = new DenseMatrix (10,10);

                A.mult(B,C);
    }

    public static void main(String[] args){
            Multiplication mult = new Multiplication();
            mult.run();
    }
}

I would appreciate any help you could provide me with this problem.

SparseVector - getUsed() and iterator() seem to misfunction

Original author: [email protected] (January 10, 2011 11:41:41)

getUsed() seems to count all, not only nonzero entries, and iterator() also goes through all, not only non-zero entries. If compact() is called the iterator goes first through nonzero entries and when these are exhausted, wrong index (0) is reported.

double[] tfVector = {0.0,0.5,0.0,0.4,0.0};
DenseVector dense= new DenseVector(tfVector, false);
SparseVector vectorTF = new SparseVector(dense);

assertTrue(vectorTF.getUsed()== 2); // vectorTF.getUsed() returns 5

for (Iterator<VectorEntry> it = vectorTF.iterator();it.hasNext();iterations++)
{

        VectorEntry ve= it.next();
        int index = ve.index();
        double value = ve.get();
        assertTrue(tfVector[index]== value);
    }
    assertTrue(nonZero == 2); // error, iterations ==5

if the same code is run after
vectorTF.compact();
then

assertTrue(vectorTF.getUsed()== 2); // also fails, since vectorTF.getUsed() returns also 5

assertTrue(nonZero == 2); // also fails, but the order of iterations changes, index=1 in first. iter,index =3 in second iter and index=0 for remaining three iters.

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=27

Documentation?

I'm quite interested in MTJ, but I can't go very far without documentation!

Possible OutOfMemoryError when calling toString method of AbstractMatrix

There are several situations where the toString method of a Matrix is called. This happens for example when debugging in an IDE or using a REPL like ScalaLab. If the matrix is big, an OutOfMemoryError will be thrown.

Would it be possible to modify the toString method to print only parts of the matrix?

java.lang.OutOfMemoryError: Java heap space
  at java.util.Arrays.copyOf(Arrays.java:2367)
  at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
  at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
  at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
  at java.lang.StringBuilder.append(StringBuilder.java:132)
  at java.lang.StringBuilder.append(StringBuilder.java:179)
  at java.lang.StringBuilder.append(StringBuilder.java:72)
  at java.util.Formatter$FormatSpecifier.print(Formatter.java:3202)
  at java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2757)
  at java.util.Formatter$FormatSpecifier.print(Formatter.java:2708)
  at java.util.Formatter.format(Formatter.java:2488)
  at java.util.Formatter.format(Formatter.java:2423)
  at no.uib.cipr.matrix.AbstractMatrix.toString(AbstractMatrix.java:787)

MatrixVectorReader appears to consume the size for sparse matrices

I'm looking at the matrix market file format from http://math.nist.gov/MatrixMarket/formats.html#MMformat, and the readMatrixSize code doesn't parse it correctly, unless I'm terribly mistaken somewhere.

I hope I'm not missing something here, but I picked a sparse matrix from matrix market at random(http://math.nist.gov/MatrixMarket/data/misc/hamm/memplus.html) and it isn't getting read by very basic code:
FileReader r = new FileReader(args[0]);
MatrixVectorReader mr = new MatrixVectorReader(r);
CompRowMatrix mat = new CompRowMatrix(mr);

The responsible code is below

    int numRows = getInt(), numColumns = getInt();
    // --------- this consumes the entry count ----------------
    int size = getInt();

    // For coordinate matrices we also read the number of entries
    if (info.isDense())
        return new MatrixSize(numRows, numColumns, info);
    else {
        // -------- so this actually reads the next integer --------------
        int numEntries = getInt();

LinkedSparseMatrix thread safe set

it would be great to be able to do parallel sets, and then effectively do streaming adjacency matrix construction as part of an Observable/RX pattern.

testColumnBiCGstab_1 fails

Original author: PaulJohnLeonard (January 05, 2010 11:37:47)

What steps will reproduce the problem?

  1. check out project
  2. set java to 1.6
  3. run tests

What is the expected output? What do you see instead?

Testcase:
testColumnBiCGstab_1(no.uib.cipr.matrix.distributed.DistIterativeSolverTest):
FAILED
expected:<0.5243072402384373> but was:<0.0>
junit.framework.AssertionFailedError: expected:<0.5243072402384373> but
was:<0.0>
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.compare(DistIterativeSolverTest.java:260)
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.testColumnBiCGstab_1(DistIterativeSolverTest.java:176)

Test no.uib.cipr.matrix.distributed.DistIterativeSolverTest FAILED

What version of the product are you using? On what operating system?

SVN at 11:36 5'th jan (GMT)

Please provide any additional information below.

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=19

visibility (thread safety) concerns over no.uib.cipr.matrix.distributed

Original author: [email protected] (July 07, 2008 21:49:58)

Many thread visibility problems were found in the test cases for the no.uib.cipr.matrix.distributed
classes. This concerns me as it makes me wonder if there are similar bugs in the classes
themselves, making the package unsafe for multi-threaded use.

See http://javablog.co.uk/2007/06/15/variable-visibility-across-threads-and-final-fields/ for a
typical example of the sort of bugs we expect may be present.

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=8

junit tests failed

Original author: [email protected] (September 06, 2012 13:29:22)

What steps will reproduce the problem?

  1. download the mtj code from svn
  2. use ubuntu 12.04 and java:

java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode)

  1. type ant

What is the expected output? What do you see instead?

junit tests should succeed

What version of the product are you using? On what operating system?

the latest from the svn

Please provide any additional information below.

Tests that failed:

[junit] Testsuite: no.uib.cipr.matrix.DenseLUTest
[junit] Tests run: 4, Failures: 0, Errors: 1, Time elapsed: 0.534 sec
[junit] 
[junit] Testcase: testDenseLUToInput(no.uib.cipr.matrix.DenseLUTest):       Caused an ERROR
[junit] Row 1, Col 0 wasn't equal! -1.0 3.0
[junit] java.lang.AssertionError: Row 1, Col 0 wasn't equal! -1.0 3.0
[junit]     at no.uib.cipr.matrix.DenseLUTest.testDenseLUToInput(DenseLUTest.java:152)
[junit] 
[junit] 
[junit] Test no.uib.cipr.matrix.DenseLUTest FAILED
[junit] Testsuite: no.uib.cipr.matrix.DenseMatrixTest

[junit] Tests run: 18, Failures: 1, Errors: 0, Time elapsed: 22.849 sec
[junit] 
[junit] Testcase: testRowBiCGstab_1(no.uib.cipr.matrix.distributed.DistIterativeSolverTest):        FAILED
[junit] expected:&lt;0.8103673448063133&gt; but was:&lt;0.0&gt;
[junit] junit.framework.AssertionFailedError: expected:&lt;0.8103673448063133&gt; but was:&lt;0.0&gt;
[junit]     at no.uib.cipr.matrix.distributed.DistIterativeSolverTest.compare(DistIterativeSolverTest.java:271)
[junit]     at no.uib.cipr.matrix.distributed.DistIterativeSolverTest.testRowBiCGstab_1(DistIterativeSolverTest.java:133)
[junit] 
[junit] 
[junit] Test no.uib.cipr.matrix.distributed.DistIterativeSolverTest FAILED
[junit] Testsuite: no.uib.cipr.matrix.distributed.PointToPointTest

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=35

2 tests failing in no.uib.cipr.matrix.distributed.DistIterativeSolverTest

Original author: [email protected] (July 07, 2008 21:43:12)

Testcase: testRowGMRES_1(no.uib.cipr.matrix.distributed.DistIterativeSolverTest): FAILED
expected:<0.5869419669838227> but was:<0.0>
junit.framework.AssertionFailedError: expected:<0.5869419669838227> but was:<0.0>
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.compare(DistIterativeSolverTest.java:260)
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.testRowGMRES_1(DistIterativeSolverTest.jav
a:95)

Testcase: testRowBiCGstab_1(no.uib.cipr.matrix.distributed.DistIterativeSolverTest): FAILED
expected:<0.8288524841557755> but was:<0.0>
junit.framework.AssertionFailedError: expected:<0.8288524841557755> but was:<0.0>
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.compare(DistIterativeSolverTest.java:260)
at
no.uib.cipr.matrix.distributed.DistIterativeSolverTest.testRowBiCGstab_1(DistIterativeSolverTest.j
ava:122)

Test no.uib.cipr.matrix.distributed.DistIterativeSolverTest FAILED
/Users/samuel/Documents/Java/matrix-toolkits-java/nbproject/build-impl.xml:572: Some
tests failed; see details above.
BUILD FAILED (total time: 50 seconds)

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=7

Why do rank 1 updates require square matrices?

Original author: [email protected] (September 15, 2010 22:39:56)

What steps will reproduce the problem?
Trying to do a rank 1 update on a non-square matrix results in an IndexOutOfBoundsException with the message "!A.isSquare".

What is the expected output? What do you see instead?
It should be possible to do rank 1 updates on non-square matrices. In AbstractMatrix.checkRank1(Vector x, Vector y), the isSquare() check should be removed.

What version of the product are you using? On what operating system?
Version 0.9.12 (current).

Please provide any additional information below.

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=24

On entry to DGELS parameter number 8 had an illegal value

Original author: [email protected] (April 06, 2009 15:56:14)

What steps will reproduce the problem?
no.uib.cipr.matrix.Vector bv = new DenseVector(bb);
Matrix am = new DenseMatrix(aa);
no.uib.cipr.matrix.Vector xv = new DenseVector(am.numColumns());
for (int x = 0; x < am.numColumns(); x++) {
xv.set(x, 1);
}
xv = Matrices.random(xv.size());
xv = am.solve(bv, xv);

What is the expected output? What do you see instead?
Expected to solve for xv.
What I see instead:
** On entry to DGELS parameter number 8 had an illegal value

What version of the product are you using? On what operating system?
Both 9.11 and 9.10 produce this problem. 9.9 works fine for some reason.

Please provide any additional information below.
...

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=13

MatrixVectorWriter/Reader problems with (default) Locale

Original author: [email protected] (December 03, 2011 20:44:40)

Hi,

there is a problem with the MatrixVectorWriter (mtj-0.9.14, Ubuntu) based on the default Locale. If the Locale is e.g. GERMAN, the double values get a comma "," instead of a dot "." like:

5,859622945927e-08 instead of 5.859622945927e-08

format("% .12e\n", data[i]);

means:

format(Locale.GERMAN, "% .12e\n", data[i]);

The MatrixVectorReader runs in an Exception because the getDouble()-Function doesn't regard the (default) Locale:

Exception in thread "Thread-3" java.lang.NumberFormatException: For input string: "5,859622945927e-08"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1242)
at java.lang.Double.parseDouble(Double.java:527)
at no.uib.cipr.matrix.io.MatrixVectorReader.getDouble(MatrixVectorReader.java:637)
at no.uib.cipr.matrix.io.MatrixVectorReader.readArray(MatrixVectorReader.java:330)

regards
Micha

Original issue: http://code.google.com/p/matrix-toolkits-java/issues/detail?id=34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.