Most Popular
1500 questions
11
votes
1 answer
How should errors be reported in scientific libraries?
There are many philosophies in different software engineering disciplines about how libraries should cope with errors or other exceptional conditions.
A few of the ones I've seen:
Return an error code with the result returned by a pointer argument.…
Daniel Shapero
- 10,263
- 1
- 28
- 59
11
votes
2 answers
CVXOPT VS. OpenOpt
CVXOPT: http://abel.ee.ucla.edu/cvxopt/index.html
OpenOpt: http://openopt.org/Welcome
What's the relation between them?
What are the advantages/disadvantages of them, respectively?
BTW, is there any other high quality general purpose convex…
updogliu
- 221
- 2
- 5
11
votes
3 answers
Numerical evaluation of highly oscillatory integral
In this advanced course on applications of complex function theory at one point in an exercise the highly oscillatory integral
$$I(\lambda)=\int_{-\infty}^{\infty} \cos (\lambda \cos x) \frac{\sin x}{x} d x$$
has to be approximated for large values…
doetoe
- 593
- 2
- 13
11
votes
4 answers
Fastest PCA algorithm for high-dimensional data
I would like to perform a PCA on a dataset composed of approximately 40 000 samples, each sample displaying about 10 000 features.
Using Matlab princomp function consistently takes over half an hour at which point I kill the process. I would like…
mellow
- 281
- 1
- 2
- 5
11
votes
1 answer
Sensitivity of BFGS to initial Hessian approximations
I'm trying to implement the Broyden-Fletcher-Goldfarb-Shanno method to find the minimum of a function. I need two initial guesses $x_{-1}$ & $x_0$ and an initial Hessian Matrix approximation $B_0$. The only requirements I find for $B_0$ is that if…
Paul
- 12,045
- 7
- 56
- 129
11
votes
3 answers
Solution of quartic equation
Is there a open C-implementation for the solution of quartic equations:
$$ax⁴+bx³+cx²+dx+e=0$$
I am thinking of an implementation of Ferrari's solution. On Wikipedia I read that the solution is computational stable only for some of the possible sign…
highsciguy
- 1,119
- 9
- 16
11
votes
3 answers
Under what circumstances is Monte Carlo integration better than quasi-Monte Carlo?
A simple enough question: to do a multidimensional integral, given that one has decided that some sort of Monte Carlo method is appropriate, is there any advantage that a regular MC integration using pseudorandom numbers has over a quasi-Monte Carlo…
David Z
- 3,383
- 2
- 27
- 34
11
votes
3 answers
What is the reason that LAPACK uses $\tau$ in QR decomposition (instead of normalizing the reflection vector)?
LAPACK's QR routine stores Q as Householder reflectors. It scales the reflection vector $v$ with $1/v_1$, so the first element of the result becomes $1$, so it doesn't have to be stored. And it stores a separate $\tau$ vector, which contains the…
geza
- 211
- 1
- 6
11
votes
1 answer
Numerically Recovering Imaginary Part of Analytic Continuation from Real Part
My situation.
I have a function of a complex variable $f(z)$ defined through a complicated integral. What I am interested in is the value of this function on the imaginary axis. I have numerical access to this function on the following ribbon:…
Arturo don Juan
- 489
- 2
- 8
11
votes
2 answers
Matrix exponential of a Hamiltonian matrix
Let $A, G, Q$ be real, square, dense matrices. $G$ and $Q$ are symmetric. Let
$$H = \begin{bmatrix} A & -G \\ -Q &-A^T \end{bmatrix}$$
be a Hamiltonian matrix. I want to compute the matrix exponential of $H$. I need the full matrix exponential,…
DerZwirbel
- 168
- 8
11
votes
2 answers
Eigenvalue decomposition of the sum: A (symmetric) + D (diagonal)
Suppose $A$ is a real symmetric matrix and its eigenvalue decomposition $V \Lambda V^T$ is given. It is easy to see what happens with the eigenvalues of the sum $A + cI$ where $c$ is a scalar constant (see this question). Can we draw any conclusion…
Ivan
- 297
- 2
- 7
11
votes
1 answer
Solving huge dense linear system?
Is there any hope in solving the following linear system efficiently with an iterative method?
$A \in \mathbb{R}^{n \times n}, x \in \mathbb{R}^n, b \in \mathbb{R}^n \text{, with } n > 10^6$
$Ax=b$
with
$
A=(\Delta - K)
$, where $\Delta$ is a very…
yon
- 213
- 1
- 6
11
votes
1 answer
First appearance of the phrase "inverse crime"
In research on inverse problems, it's common to construct a synthetic data set from a known set of parameters and then test whether the inversion technique can reconstruct those parameters. In doing so, it's important to add appropriate levels of…
Brian Borchers
- 18,719
- 1
- 39
- 70
11
votes
3 answers
Thrust for GPU programming
I'm very new to GPGPU programming so please forgive me if the question is not particularly appropriate. From what I understand GPU programming is a very intricate piece of engineering work when compared to usual CPU programming. One has to be very…
mmirzadeh
- 1,435
- 1
- 10
- 17
11
votes
2 answers
Guides on Python for shared-memory Parallel Programming
I have experience in coding OpenMP for Shared Memory machines (in both C and FORTRAN) to carry out simple tasks like matrix addition, multiplication etc. (Just to see how it competes with LAPACK). I know OpenMP enough to carry out simple tasks…
Inquest
- 3,394
- 3
- 26
- 44