当前位置: 首页>>代码示例>>C++>>正文


C++ _zhematrix::complete方法代码示例

本文整理汇总了C++中_zhematrix::complete方法的典型用法代码示例。如果您正苦于以下问题:C++ _zhematrix::complete方法的具体用法?C++ _zhematrix::complete怎么用?C++ _zhematrix::complete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在_zhematrix的用法示例。


在下文中一共展示了_zhematrix::complete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: newmat

/*! _zhematrix*_zhematrix operator */
inline _zgematrix operator*(const _zhematrix& matA, const _zhematrix& matB)
{
#ifdef  CPPL_VERBOSE
  std::cerr << "# [MARK] operator*(const _zhematrix&, const _zhematrix&)"
            << std::endl;
#endif//CPPL_VERBOSE
  
#ifdef  CPPL_DEBUG
  if(matA.N!=matB.N){
    std::cerr << "[ERROR] operator*(_zhematrix&, zhematrix&)" << std::endl
              << "These two matrises can not make a product." << std::endl
              << "Your input was (" << matA.N << "x" << matA.N << ") * ("
              << matB.N << "x" << matB.N << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  matB.complete();
  zgematrix newmat( matA.N, matB.N );
  
  zhemm_( 'L', 'L', matA.N, matB.N, std::complex<double>(1.0,0.0), 
          matA.Array, matA.N, matB.Array, matB.N, 
          std::complex<double>(0.0,0.0), newmat.array, newmat.m );
  
  matA.destroy();
  matB.destroy();
  return _(newmat);
}
开发者ID:ninghang,项目名称:bayesianPlay,代码行数:29,代码来源:_zhematrix-_zhematrix.hpp

示例2: newmat

/*! _zhematrix*_zhematrix operator */
inline _zgematrix operator*(const _zhematrix& matA, const _zhematrix& matB)
{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if(matA.n!=matB.n){
    ERROR_REPORT;
    std::cerr << "These two matrises can not make a product." << std::endl
              << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.n << "x" << matB.n << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  matB.complete();
  zgematrix newmat( matA.n, matB.n );
  
  zhemm_( 'l', 'l', matA.n, matB.n, comple(1.0,0.0), 
          matA.array, matA.n, matB.array, matB.n, 
          comple(0.0,0.0), newmat.array, newmat.m );
  
  matA.destroy();
  matB.destroy();
  return _(newmat);
}
开发者ID:phelrine,项目名称:NBTools,代码行数:23,代码来源:_zhematrix-_zhematrix.hpp


注:本文中的_zhematrix::complete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。