아마 누군가가 알기에 Eigen에서 선언 형을 전달할 수 있습니까? MatrixXd & VectorXd?형식의 전달 선언 MatrixXd & VectorXd?
/usr/include/eigen3/Eigen/src/Core/Matrix.h:372:34 : 오류 : '형식 정의 클래스 아이겐을 선언 충돌 :: 매트릭스 컴파일하는 동안
, 나는 다음과 같은 오류가 Eigen :: MatrixXd '
typedef 매트릭스 매트릭스 ## SizeSuffix ## TypeSuffix;
SIMP.h
#ifndef SIMP_H
#define SIMP_H
namespace Eigen
{
class MatrixXd;
class VectorXd;
}
class SIMP {
public:
SIMP(Eigen::MatrixXd * gsm, Eigen::VectorXd * displ);
SIMP (const SIMP& other) = delete;
~SIMP(){}
SIMP& operator= (const SIMP& other) = delete;
bool operator== (const SIMP& other) = delete;
private:
Eigen::MatrixXd * m_gsm;
Eigen::VectorXd * m_displ;
};
#endif // SIMP_H
SIMP.cpp
#include "SIMP.h"
#include <Eigen/Core>
SIMP::SIMP(Eigen::MatrixXd * gsm, Eigen::VectorXd * displ) :
m_gsm(gsm),
m_displ(displ),
{
}
명백한 템플릿을 설정하기위한 몇 가지 자동 typedef =) –
답변 해 주셔서 감사합니다! –