• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisãobc389f6a4dffa2e708011d9995bbdc01be540b54 (tree)
Hora2013-08-22 18:04:45
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Mensagem de Log

MolDS_base::MathUtilities::Max and MolDS_base::MathUtilities::min is replaced with std::max and std::min.

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

Mudança Sumário

Diff

--- a/src/base/MathUtilities.cpp
+++ b/src/base/MathUtilities.cpp
@@ -32,7 +32,6 @@
3232 #include"../mpi/MpiProcess.h"
3333 #include"../wrappers/Lapack.h"
3434 #include"MathUtilities.h"
35-#include"MallocerFreer.h"
3635 using namespace std;
3736
3837 namespace MolDS_base{
@@ -69,26 +68,6 @@ int Conbination(int n, int k){
6968 }
7069 }
7170
72-// max
73-template <typename T> T Max(T a, T b){
74- if(a<b){
75- return b;
76- }
77- else{
78- return a;
79- }
80-}
81-
82-// min
83-template <typename T> T min(T a, T b){
84- if(a<b){
85- return a;
86- }
87- else{
88- return b;
89- }
90-}
91-
9271 // rotating matrix
9372 void CalcRotatingMatrix(double matrix[][3], double theta, CartesianType cartesianType){
9473 if(cartesianType == XAxis){
--- a/src/base/MathUtilities.h
+++ b/src/base/MathUtilities.h
@@ -23,10 +23,6 @@ namespace MolDS_base{
2323 int Factorial(int n);
2424 // nCk
2525 int Conbination(int n, int k);
26-// max
27-template <typename T> T Max(T a, T b);
28-// min
29-template <typename T> T min(T a, T b);
3026 // rotating matrix
3127 void CalcRotatingMatrix(double matrix[][3], double theta, CartesianType cartesianType);
3228 // calculate determinant of the matrix. Note taht the matrix will be destroid
--- a/src/optimization/BFGS.cpp
+++ b/src/optimization/BFGS.cpp
@@ -21,6 +21,7 @@
2121 #include<stdlib.h>
2222 #include<string.h>
2323 #include<iostream>
24+#include<algorithm>
2425 #include<sstream>
2526 #include<math.h>
2627 #include<string>