ReFRACtor
powell_singular_nlls_problem.cc
Go to the documentation of this file.
2 
3 
4 using namespace FullPhysics;
5 using namespace blitz;
6 
7 // See base class for description.
9 {
10  if(R.size() <= 0) {
11  assert_parameter_set_correctly();
12  increment_num_cost_evaluations();
13  R.resize(residual_size());
14 
15  R = X(0)+10.0*X(1), sqrt(5.0)*(X(2)-X(3)), (X(1)-2.0*X(2))*(X(1)-2.0*X(2)), sqrt(10.0)*(X(0)-X(3))*(X(0)-X(3));
16  }
17  return R.copy();
18 }
19 
20 // See base class for description.
22 {
23  if(J.size() <= 0) {
24  assert_parameter_set_correctly();
25  increment_num_der1_evaluations();
26  J.resize(residual_size(), parameter_size());
27 
28  J = 1.0, 10.0, 0.0, 0.0,
29  0.0, 0.0, sqrt(5.0), -sqrt(5.0),
30  0.0, 2.0*(X(1)-2.0*X(2)), -4.0*(X(1)-2.0*X(2)), 0.0,
31  2.0*sqrt(10.0)*(X(0)-X(3)), 0.0, 0.0, -2.0*sqrt(10.0)*(X(0)-X(3));
32  }
33  return J.copy();
34 }
virtual blitz::Array< double, 1 > residual()
The residual vector function.
const Unit J("J", N *m)
Apply value function to a blitz array.
AutoDerivative< T > copy() const
Create deep copy.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual blitz::Array< double, 2 > jacobian()
The Jacobian matrix function.

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:10