Reply to topic

error: has no member named 'startFill'

Vanderbilt2
Registered Member
Posts
2
Karma
0
OS
Hi,
I am a new user of Eigen, so I started with filling a sparse matrix as describe here:
http://eigen.tuxfamily.org/dox-2.0/TutorialSparse.html

But I kept having compilation errors:
matrix_ios.c:84: error: ‘class Eigen::SparseMatrix<float, 0, int>’ has no member named ‘startFill’
matrix_ios.c:92: error: ‘class Eigen::SparseMatrix<float, 0, int>’ has no member named ‘fill’
matrix_ios.c:97: error: ‘class Eigen::SparseMatrix<float, 0, int>’ has no member named ‘endFill’

My code is:
Code: Select all
    Eigen::SparseMatrix<float> sp(M, N);
    sp.startFill(nz);
    int II, JJ;
    double vall;
    for (i=0; i<nz; i++)
    {
        fscanf(f, "%d %d %lg\n", &II, &JJ, &vall);
        II--;  /* adjust from 1-based to 0-based */
        JJ--;
        sp.fill(II, JJ) = vall;
        I[i] = II;
        J[i] = JJ;
        val[i] = vall;
    }
    sp.endFill();
    sparse = sp;


Thanks,
jitseniesen
Registered Member
Posts
186
Karma
2
Are you really using the old version of Eigen (version 2)? That is the version that http://eigen.tuxfamily.org/dox-2.0/TutorialSparse.html is written for.

For the current version of Eigen (version 3.0), please look at http://eigen.tuxfamily.org/dox/TutorialSparse.html . However, especially for the sparse module it's probably best to use the current development version (gearing up to be released at 3.1); the documentation for that is at http://eigen.tuxfamily.org/dox-devel/Tu ... parse.html . As you'll note, the startFill() functions have disappeared, so if you are using Eigen version 3.0 or later that would explain the error message.
Vanderbilt2
Registered Member
Posts
2
Karma
0
OS
Thanks, that helps alot!
Cheers,

 
Reply to topic

Bookmarks



Who is online

Registered users: alake, Baidu [Spider], bcooksley, Bing [Bot], claydoh, Exabot [Bot], garthecho, Google [Bot], koriun, Majestic-12 [Bot], north, rodsherwin, shmerl, Steve Guilford, verbalshadow, Vim, Yahoo [Bot], šumski