int main(void) { XVECTOR vLower(2); XVECTOR vUpper(2); XVECTOR vThreshold(2); XVECTOR vExpected(2); XVECTOR vResult(2); vExpected.Set(0,0.75); vExpected.Set(1,0.6); vLower.Set(0,0.0); vLower.Set(1,0.0); vUpper.Set(0,1.0); vUpper.Set(1,0.75); vThreshold.Set(0,0.0001); vThreshold.Set(1,0.0001); xPerform_Fit_Bound_Simplex(vLower,vUpper,vThreshold,Test_Function,vResult,&vExpected,"xfit.cache"); printf("\n"); vResult.Print(); }
vec3f operator / ( const float scalar, const vec3f &other ) { vec3f vResult(0.0f, 0.0f, 0.0f); vResult.x = other.x / scalar; vResult.y = other.y / scalar; vResult.z = other.z / scalar; return vResult; }
void main() { int n = 5; cout << "CountWay : " << CountWay(n) << endl;; cout << "CoundWayDP : " << CountWayDP(n) << endl; int nCount = 0; MyCountWay(n, nCount); cout << "MyCountWay : " << nCount << endl; vector< int > vResult(100, 0); int Result = MyCountWayDP(vResult, n); cout << "MyCountWayDB : " << Result << endl; }
vec3f vec3f::operator - ( void ) { vec3f vResult(-x, -y, -z); return vResult; }