A powerful object oriented programming language.

learn more… | top users | synonyms

3
votes
1answer
105 views

State of the art in parallel data structures

I'm currently evaluating how I could implement several algorithms on a parallel computer with a large number of nodes, each also equipped with a powerful GPU. It turns out that for many algorithms, it ...
1
vote
2answers
79 views

GSA Search Algorithm in C++

Is there any version of GSA (Gravitational Search Algorithm)[1] implemented with C++ or even C#? What I found was implemented using MATLAB which is not good for me. [1] Rashedi, Esmat, Hossein ...
0
votes
1answer
127 views

Three body problem in C++

I am in a begginers programming course and we got a little project. I chose to simulate the three body problem using the Euler method. Even though the system is chaotic there are some special cases ...
0
votes
1answer
120 views

Equation of motion by RK4 method

I would like to sole the spring mass equation of the form: $M\ddot{Y}+B\dot{Y}+KY = F_y(t)$, where $M :$ mass, $B :$ Damping, $K : $ stiffness, $F_y :$ external force and $Y :$ displacement in ...
1
vote
2answers
132 views

C++ libraries for Fast Fourier Transform in high precision

I am looking for a C++ library for Fast Fourier Transform (FFT) in high precision (e.g., using high precision real data types similar to mpfr_t in MPFR or ...
2
votes
1answer
82 views

Complex Numerical Integration using GSL

I want to program an integration routine in C++ using the GSL library but for complex functions. How should I split my integrand to apply the gsl_integration_qag function on it. Just integrate the ...
0
votes
0answers
10 views

Object classification using Recurrent Motion Image

I want to make a program in opencv using recurrent Motion Image,I made a lot of research on the net but I found only some informations about this method in some papers without a detailed algorithm.I'm ...
1
vote
2answers
100 views

Which C++ Multi-objective Optimization libraries allows the addition of custom problems and custom algorithms?

I'm working on a custom discrete and constrained multi-objective optimization problem and I'd like to know which libraries or platforms that implement algorithms like ...
1
vote
1answer
72 views

Efficiently rotate vector in 2D (and 3D)

I need to efficiently rotate a 2D (and 3D) vector in a CUDA kernel. I was thinking about generating random unitary rotation matrices. I don't need to know the angle, it just has to be randomly ...
3
votes
1answer
90 views

Stabilizing a 3x3 real symmetric matrix eigenvalue calculation

I have many 3x3 real symmetric matrices for which I need to determine the eigenvalues. Wikipedia gives a nice non-iterative algorithm for this case, which I have translated into C++: ...
0
votes
0answers
16 views

How to solve a model with a quadratic term in the objective function on CPLEX?

I introduced a model with a quadratic objective function in CPLEX but it takes a long time to solve it, I think there is a way to tell CPLEX that the model has a quadratic objective function, but I ...
0
votes
0answers
18 views

Adaptiv numerical integration of a univariate vector integrand

Background & Problem formulation I'm trying to write a simple program in C++ that performs adaptiv numerical integration of vector valued integrands (in one variable), i.e. $$\int_a^b \bar{f}(x)...
-2
votes
1answer
72 views

How to implement Lagrangian/Polynomial Interpolation for my C++ Code?

I have a working C++ function: ...
0
votes
1answer
69 views

How does MPI differentiate between two computers?

I am starting to dabble in MPI. I am fairly new to this area and I am currently reading the MPI standard. I would like to write my first MPI program, a simple hello world program, on a cluster that ...
0
votes
1answer
79 views

Inversion of a matrix using c++ library armadillo or eigen [closed]

I'm trying to find inverse of a matrix using c++ library armadillo or eigen. But first row of the matrix is wrong, please note that other elements are correct. I'm unable to understand what mistake I ...
3
votes
2answers
89 views

I am searching for c++ code of the complex polygamma function

I googled about some code on the complex polygamma function especially c++ code, but can't find anything. Does anyone know where to find such code? The complex digamma function does exist but not the ...
0
votes
1answer
61 views

$LU$ factorization routine to solve system $Lv = f$ and $Uv = f$

I implemented an $LU$ factorization algorithm on c++ for a $n$ by $n$ matrix $A$, and I wanted to now write a routine that solves the systems $Lv = f$ and $Uv = f$. How would you recommend writing ...
-1
votes
2answers
196 views

$LU$ factorization

Our task is to implement a factorization routine that given A in a suitably efficient data structure returns the factors $L$ and $U$ where $L$ is unit lower triangular and $U$ is upper triangular. In ...
3
votes
2answers
179 views

FEM libraries with weak forms

I need to implement a structural analysis code, and I turn to you for advice. My needs are simple: Library must be integrable in a C++ code I want to express a weak form, without manual intervention ...
-2
votes
1answer
93 views

Understanding and implementing the Fast Fourier Transform

I need to write the fast fourier transform in C++ and I am referring to this formula from wikipedia: But for some reason I am not getting the correct output when I simply enter (1,1) (1,1) (1,1) (1,...
1
vote
2answers
138 views

Programming language for HPC [closed]

I'm planning on building a program that will carry out HPC. I'm aware that C/C++ is significantly better than Python in terms of the speed of computation. However, I'm not yet proficient in C/C++, so ...
0
votes
0answers
55 views

Fastest way to diagonalize square matrices with c++

I am currently writing software in c++ which solves the eigenvalue problem of sparse hermitian matrices. The size of the matrix depends on the user input, but as an estimation it will roughly be ...
0
votes
0answers
63 views

How to build a regression tree in C++

I want to build a random forest that estimates facial landmarks. A random forest is a set of regression trees, built in a certain way. The problem is that I am new to machine learning, yes I ...
6
votes
3answers
281 views

What do C, C++ and Java have that Fortran 2003 don't? [closed]

As you may know, Fortran is widely and longly (?) used in science. I've heard a lot of people saying that we natural scientists should all migrate to C++ or Java. I've seen people increasingly ...
6
votes
0answers
69 views

Library with polylogarithm function

I am looking for a reliable library where I can find polylogarithm function and newton/secant method for solving non-linear equations. Basically I have something like this: ...
2
votes
1answer
104 views

Armadillo library appears slow

I have been experimenting in building a C++ project for a FDTDS system for Electro-Magnetics. I have implemented a class [see below] which I called mesh using the Armadillo library. The 3D matrices {...
4
votes
2answers
100 views

Advice on handling many “small” matrices in parallel

I'm working on a small fun project on the side for a numerical method I've been working a bit with. Roughly, the computational problem I have to solve is the following: Assume you have a collection of ...
2
votes
0answers
39 views

FFT-based Image Rotation Algorithms More Accurate Than Chirp-Z?

We're currently using a Chirp-Z based implementation (Tong and Cox, 1999) for rotation of astronomical images. I was wondering if there were any algorithms/implementations out there that could also be ...
2
votes
1answer
99 views

Topics about the deal.II finite element library class “SparsityPattern”

When learning the deal.II FE library, I am a bit confused about the mechanism of its "SparsityPattern" class. Through reading the documentation, I only got to know that it uses the Compressed Row ...
0
votes
0answers
111 views

Solving Linear Equations using Eigen

I am trying to solve linear equations in c++ using the Eigen library. For the simple equation Ax=b, I have a sparse matrix A that is n x n, and known values for b which is n x 1, but I need to find ...
0
votes
0answers
253 views

Looking for a C/C++ implementation of the Hungarian method for real-valued cost matrix

I am looking for a C/C++ implementation of the Hungarian method for solving the linear assignment problem with real-valued cost matrix. Some implementation I found, such as this one, only work for ...
3
votes
0answers
43 views

Coupled Diff Equation from Bose Einstein distribution

I am a student doing physics hons and have had very little experience in programming. This semester we are supposed to do a computational project in thermodynamics. I have to solve these two coupled ...
2
votes
1answer
58 views

overflow upper incomplete gamma function

I want to calculate the following equation: $$\frac{\theta \Gamma \left(k+1,\frac{o}{\theta }\right)-o \Gamma \left(k,\frac{o}{\theta }\right)}{\Gamma (k)}+o+s$$ with $s>0, o>0, k>0, \theta&...
1
vote
2answers
98 views

Traveling Salesman Problem

First off some context. The Traveling Salesman Problem(TSP) is to find the most efficient route passing through a series of points only once. However, there is no perfect function to solve for this in ...
2
votes
2answers
216 views

How to implement adaptive mesh refinement using conformal triangles

I am trying to implement adaptive mesh refinement for a finite element code. The code uses (at least for now) linear triangles and so when I do the mesh refinement I want the triangular mesh to remain ...
2
votes
1answer
107 views

Kernel of a Sparse Matrix

Given a sparse rectangular matrix $A$ (let's say, with dimension $n,m$ and number of non-zero elements $O(n)\sim O(m)$) with entries in $\mathbb Z/2\mathbb Z$ I'm looking for a basis of the kernel as ...
1
vote
1answer
144 views

Kummer's confluent hypergeometric for complex arguments in C/C++?

I need to evaluate Kummer's confluent hypergeometric function for imaginary arguments: $$_1F_1(a,b;ix)$$ where $i$ is the imaginary unit, $a,b,x$ are real, and $a,b>0$. Is there a routine ...
2
votes
0answers
196 views

C++ library for numerical intergration (quadrature)

I have my own little subroutine for numerical integration (quadrature), which is a C++ adaptation of an ALGOL program published by Bulirsch & Stoer in 1967 (Numerische Mathematik, 9, 271-278). I ...
6
votes
1answer
111 views

Using Log Gamma function to avoid overflow

I have to do some numerical calculus using gamma functions. I am using the tgamma incluided in the C++ cmath library. The ...
1
vote
1answer
143 views

Is there a single C++ IDE packed with necessary scientific libraries for computing purpose?

I am basically looking for a good open source C++ IDE with scientific and visualization libraries built in. Can any one suggest few projects?
0
votes
0answers
66 views

C++ Library: What is the Most Efficient Library that Factorizes a Polynomial?

I need to know what library is the fastest one that can factorize a polynomial of large degree whose coefficients are big integers. I have tried NTL library to factorize a monic polynomial but it is ...
18
votes
6answers
1k views

Modern C++ in scientific computing?

I am looking for books or articles, or blog-posts, or any published material in general, that address specifically the uses of C++ modern features (move semantics, the STL, iterators, lazy evaluation, ...
2
votes
1answer
135 views

Recommendation for C/C++ library which offers Schur complement functions?

I need to find C/C++ libraries which offer function for computing Schur complement. I know about MUMPS and Pastix, but I need more of them to compare them in my research. Do you have any experience ...
1
vote
1answer
74 views

Interpolation using compactly supported radial basis function

I have been struggling for two days with the following problem. I would like to do a $d$-dimensional interpolation over some data. I tried first to use polyharmonic splines, but when the size of data ...
2
votes
2answers
422 views

C++ Library: What is the common libraries that do polynomial arithmetic?

I need to know what libraries (in C++) support polynomial arithmetic specially over a field. So I can give to it an array of coefficients of polynomial over a field and it returns the roots of ...
2
votes
0answers
82 views

C++: How to find the roots of polynomial modulus N [duplicate]

I need to know what library, given a vector of coefficients and modulus N return the roots of polynomial modulus N. The library should support big integer. I'm coding in C++.
4
votes
3answers
148 views

Minimization of non-linear function

Problem Summary I am trying to estimate the (x,y) coordinates of each node in a graph, where I know the distances between connected nodes. For example Given this ...
1
vote
1answer
70 views

C++ - Starting paraller instances of an executable from a C++ code

Can I start parallel run of LAMMPS from inside a C++ code. Is it possible to compile my code and then do mpirun with my compiled code. I also have one system command inside the code, which starts ...
-2
votes
1answer
160 views

How to solve this differential equation using RK4 in C++?

I have been given the following homework question to solve: I am having trouble writing a RK4 solver in C++ for this ODE. I am also not sure how to plot my solution. Here is my code so far: ...
3
votes
1answer
152 views

Why is MPI/PETSc only showing 1 processor even though it works for helloworld?

I am a beginner with Unix and MPI. For the serial program, I run the program by typing make in /directory/buildagain and then <...