用犰狳标准化向量

时间:2018-07-31 12:30:40

标签: c++ vector normalization armadillo

假设我正确理解,我创建了一个2元素向量,希望使用文档中所示的以下步骤对其进行标准化:

  arma::vec V1(2) ;

  V1(0,0) = -2;
  V1(1,0) = -1;

  V1 = normalise(V1) ;

但是,这给出了以下(对我来说,很荒谬)错误:

Undefined symbols for architecture x86_64:
"_wrapper_dasum_", referenced from:
  double arma::op_norm::vec_norm_1_direct_std<double> . 
 (arma::Mat<double> const&) in armaPrac-added5.o
  "_wrapper_dnrm2_", referenced from:
  double arma::op_norm::vec_norm_2_direct_std<double> . 
 (arma::Mat<double> const&) in armaPrac-added5.o
   ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to 
  see invocation)

任何建议将不胜感激:)

0 个答案:

没有答案