2014-09-13 1 views

답변

0

예, 할 수 있습니다

#include <iostream> 
#include <algorithm> 
#include <Eigen/Dense> 

using namespace Eigen; 

int main() 
{ 

    VectorXd e_vec(5); 
    e_vec << 1, 2, 3, 4, 5; 
    std::swap(e_vec[0], e_vec[2]); 

    std::cout << e_vec << std::endl; 

    return 0; 
} 

가 생산 :

3 
2 
1 
4 
5 
관련 문제