Comments (12)
You need to set EIGEN_INCLUDE_PATH
. I've updated the configure script to throw an error if this is not found.
from optim.
thank you, now it can compile, but throw an error:
./include/misc/matrix_ops/access.hpp:35:50: error: ‘all’ is not a member of ‘Eigen’
#define OPTIM_MATOPS_ROWS(x, v) (x)(v,Eigen::all) // v is a vector
^
./include/misc/matrix_ops/eval.hpp:30:35: note: in definition of macro ‘OPTIM_MATOPS_EVAL’
#define OPTIM_MATOPS_EVAL(x) (x).eval()
^
src/unconstrained/nm.cpp:149:44: note: in expansion of macro ‘OPTIM_MATOPS_ROWS’
simplex_points = OPTIM_MATOPS_EVAL(OPTIM_MATOPS_ROWS(simplex_points, sort_vec));
^~~~~~~~~~~~~~~~~
I use eigen3, don't know if it's ik
from optim.
When you ran configure
what was the output under OPTIM_MATLIB_INCLUDE_PATH set to:
from optim.
OPTIM_MATLIB_INCLUDE_PATH set to:
/usr/include/eigen3
/usr/include/eigen3 is EIGEN_INCLUDE_PATH
from optim.
compile failed when it run:
g++ -std=c++11 -Wall -fPIC -O3 -march=native -ffp-contract=fast -flto -DNDEBUG -fopenmp -DOPTIM_ENABLE_EIGEN_WRAPPERS -I/usr/include/eigen3 -I./include src/unconstrained/nm.cpp -c -o src/unconstrained/nm.o
from optim.
Sounds like an issue with your installation of Eigen.
I just pulled the latest version of Eigen from GitLab:
https://gitlab.com/libeigen/eigen
And the library compiled without issue.
As a sanity check, you could try the following:
cd ~/Desktop
git clone https://gitlab.com/libeigen/eigen.git
export EIGEN_INCLUDE_PATH="${PWD}/eigen"
Then change back to the directory where you've pulled OptimLib and run ./configure -l eigen && make
again.
from optim.
finally it build success
but when i use the lib to compile example, it throw a lot of errors, like:
/include/misc/matrix_ops/get_sort_index.hpp:22:1: error: ‘VecInt_t’ does not name a type; did you mean ‘uint_t’?
VecInt_t
I don't know what wrong?
from optim.
You need to include an example of what you're trying to compile, along with the compiler options.
from optim.
Try the same example again with
#define OPTIM_ENABLE_EIGEN_WRAPPERS
#include "optim.hpp"
from optim.
thank you, it worked.
thank you for you patient, I should read the docs first.
from optim.
No worries; thanks for pointing out some gaps in the build process and docs. Feel free to reopen if you encounter any other build-related errors.
from optim.
and i found a small iusse when build test
it throw error when i build test like this:
newton_logit_reg.cpp:115:67: error: ‘std::chrono’ has not been declared
I just add #include to fix it.
from optim.
Related Issues (20)
- feature request: custom initialization of simplex for Nelder-Mead HOT 2
- Eigen::all is now Eigen::placeholders::all HOT 1
- Build fail on msys2 HOT 1
- Cannot build Header Only HOT 1
- Getting error on MSVC - optim_options.hpp HOT 1
- Last step of GD leads to crash (eigen version) HOT 9
- Add basic example for Eigen HOT 1
- error configure header-only HOT 1
- Error in header-only-library HOT 1
- Error of example in the document HOT 1
- BaseMatrixOps is empty when installing header files only HOT 1
- how to input two nonlinear euqatoins.
- PSO center_particle HOT 6
- compilation probleme due to include path HOT 1
- Compile as a static library? HOT 2
- Error when compiling with RCpp: no match for call to function HOT 4
- After "./configure --header-only-version" the folder "header_only_version/BaseMatrixOps" is empty HOT 5
- Trouble using optim and mcmc in same project HOT 2
- print_level not printing error value HOT 1
- header-only-version does not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optim.