• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版a3881533a68ea34deaca6c3b8a68643c46bb961b (tree)
时间2012-12-05 16:55:11
作者Katsuhiko Nishimra <ktns.87@gmai...>
CommiterKatsuhiko Nishimra

Log Message

Initialize Hessian matrix using dcopy. #28764

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1177 1136aad2-a195-0410-b898-f5ea1d11b9d8

更改概述

差异

--- a/src/optimization/BFGS.cpp
+++ b/src/optimization/BFGS.cpp
@@ -123,11 +123,8 @@ void BFGS::SearchMinimum(boost::shared_ptr<ElectronicStructure> electronicStruct
123123 try{
124124 // initialize Hessian with unit matrix
125125 MallocerFreer::GetInstance()->Malloc(&matrixHessian, dimension, dimension);
126- for(int i=0; i<dimension; i++){
127- for(int j=i; j<dimension; j++){
128- matrixHessian[i][j] = matrixHessian[j][i] = i==j ? 1.0 : 0.0;
129- }
130- }
126+ const double one = 1;
127+ MolDS_wrappers::Blas::GetInstance()->Dcopy(dimension, &one, 0, &matrixHessian[0][0], dimension+1);
131128
132129 // initial calculation
133130 bool requireGuess = true;