c++ 10西雅图Embarcadero类型complex_array

C++ 10 Seattle Embarcadero Type complex_array

本文关键字:complex array 类型 Embarcadero 西雅图 c++      更新时间:2023-10-16

我正在尝试使用MSVC的开源代码nec2++https://github.com/tmolteno/necpp

有一个未定义的类型complex_array, Builder不能识别它。我已经安装了Boost,但在文档中没有看到这种类型。我假设这是一个实数和虚数数组的类型。我在Builder或Boost文档中找不到这样的类型。

我正在寻找可能的解决方案来移植这个代码。

complex_array是在nec2++的math_util.h头文件中定义的自定义类:

#if USING_EIGEN_ARRAY
  #include <Eigen/Dense>
  typedef Eigen::Matrix<int32_t, Eigen::Dynamic, 1>  int_array;
  typedef Eigen::Matrix<nec_float, Eigen::Dynamic, 1>  real_array;
  typedef Eigen::Matrix<nec_complex, Eigen::Dynamic, 1>  complex_array; // <-- here
#else
  // Use our own types rather than Eigen
  #include "safe_array.h"
  typedef safe_array<int32_t>  int_array;
  typedef safe_array<nec_float>  real_array;
  typedef safe_array<nec_complex>  complex_array; // <-- here
  typedef safe_matrix<int32_t>  int_matrix;
  typedef safe_matrix<nec_float>  real_matrix;
  typedef safe_matrix<nec_complex>  complex_matrix;
#endif

无论您正在编译的代码声称complex_array是未定义的,都缺少math_util.h#include语句。