linear-algebra

How to solve a linear system in Linux shell?

Hi, Does anyone know of a Linux command that reads a linear system of equations from its standard input and writes the solution (if exists) in its standard output? I want to do something like this: generate_system | solve_system ...

T and R estimation from essential matrix

I create simple test application to perform translation(T) and rotation (R) estimaiion from essential matrix. Generate 50 random Points. Calculate projection pointSet1. Transform Points via matrix (R|T). Calculate new projection pointSet2. Then calculate fundamental matrix F. Extruct essential matrix like E = K2^*F*K1 (K1, K2 - int...

XNA - Getting mouse coordinates with a 2d Camera system with rotation/zoom/translation

I have a 2d Camera with this translation matrix: Transform = Matrix.CreateTranslation(new Vector3(-Position.X, -Position.Y, 0)) * Matrix.CreateRotationZ(Rotation) * Matrix.CreateScale(new Vector3(Scale, Scale, 0)) * Matrix.CreateTranslation(new Vector3((GraphicsDevic...

C++ matrix-vector multiplication

Hello! When working with 3d graphics, sample shaders USUALLY use the following operation for vector position transformation: result = mul(matrix, vector); This obviously means the same as: result = mul(vector, matrix_transposed); Also, just to mention, most linear algebra libraries prefer to only leave the vector * matrix multiplic...

Python vs. C++ for an application that does sparse linear algebra

I'm writing an application where quite a bit of the computational time will be devoted to performing basic linear algebra operations (add, multiply, multiply by vector, multiply by scalar, etc.) on sparse matrices and vectors. Up to this point, we've built a prototype using C++ and the Boost matrix library. I'm considering switching to...

ATLAS Linear algebra and openmpi on multicore with python

I use mpi4py and openmpi on a multi-cpu/core machine to do linear algebra. My numpy is built using ATLAS. Suppose I have a 4 core machine and I would like to run a 4 node python script that does linear algebra on each node using numpy. How can I ensure that ATLAS does not use more than one core when it is doing linear algebra in each no...

Best free Cross-Platform Library for higher level Matrix, Vector and esp. SparseMatrix operations?

Our Platforms: Windows, Linux, Mac OSX. Free: LGPL compatible Support high-level operations: Eigensystems, SVD, QR, LU, inverse, pseudo inverse (aka Moore-Penrose inverse),... Support many matrix types and also good performing small matrices e.g. 3x3: Sparse, Symmetric,... (and also operations on them!, e.g. pseudoInverse()...

Finding bounds for 21-variable inequalities

I have the following inequalities on 21 variables: http://pastebin.com/raw.php?i=FTU970Em When I run "Reduce[ineq,Integers]" on this, Mathematica hangs for a long time. That makes sense: there are MANY sets of values for x[1]..x[21] that satisfy the inequalities. All I really want is bounds for each variable (eg, "2 <= x[i] <= ...

C++ library for calculating the matrix exponential

Any recommendations for libraries to implement calculation of the matrix exponential? ...

Python Implementation of PageRank

I am attempting to understand the concepts behind Google PageRank, and am attempting to implement a similar (though rudimentary) version in Python. I have spent the last few hours familiarizing myself with the algorithm, however it's still not all that clear. I've located a particularly interesting website that outlines the implementat...

Is there an simple algorithm for calculating maximum inscribed circle into a convex polygon?

I found some solutions, but they're too messy. ...

Good Linear Algebra Package

Hello, I am implementing some spectral graph algorithms for a project. A large part of this is finding eigenvalues and eigenvectors of large, sparse matrices, as well as multiplying matrices. My question is, what are the fastest libraries that do this? I've been looking at NumPy for Python or JAMA for Java. Are these good, or is t...

PDF calculate Glyph sizes

I (think) have every values for Text-Rendering in a PDF. * Position (Text Matrix) * FontDescriptor with Widths Array * FontBBox * StemV/StemH * FontName * Descent * Ascent * CapHeight * XHeight * ItalicAngle My problem is I don't know what to do with these values. I went through the PDF Spec 1.7 a couple of times and cannot find a for...

UMFPACK and BOOST's uBLAS Sparse Matrix

I am using Boost's uBLAS in a numerical code and have a 'heavy' solver in place: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LU_Matrix_Inversion The code works excellently, however, it is painfully slow. After some research, I found UMFPACK, which is a sparse matrix solver (among other things). My code generates la...

Any Sparse Linear Algebra package in Haskell?

Is there any package to perform Sparse Linear Algebra computations, maybe based on fast and efficient C libraries? I searched on Hackage but I didn't find anything at regard: hmatrix, which uses GSL, BLAS and LAPACK, is great, but doesn't seem to include special algorithms to solve linear systems and eigen-values/vectors problems with sp...

image tile registrations

I'm trying to create a mapping for tile/pixel positions in one tiled image dataset to tile/pixel position in a different dataset (that roughly cover the same image area). Due to rotations of the imaged area, panning axis, translations, and scale changes, there are many unknowns to account for in this mapping. This situation is illustrate...