GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
hess.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2018 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_hess_h)
24 #define octave_hess_h 1
25 
26 #include "octave-config.h"
27 
28 #include <iosfwd>
29 
30 namespace octave
31 {
32  namespace math
33  {
34  template <typename T>
35  class
36  hess
37  {
38  public:
39 
40  hess (void)
41  : hess_mat (), unitary_hess_mat ()
42  { }
43 
44  hess (const T& a)
45  : hess_mat (), unitary_hess_mat ()
46  {
47  init (a);
48  }
49 
50  hess (const T& a, octave_idx_type& info)
51  : hess_mat (), unitary_hess_mat ()
52  {
53  info = init (a);
54  }
55 
56  hess (const hess& a)
57  : hess_mat (a.hess_mat), unitary_hess_mat (a.unitary_hess_mat)
58  { }
59 
60  hess& operator = (const hess& a)
61  {
62  if (this != &a)
63  {
64  hess_mat = a.hess_mat;
65  unitary_hess_mat = a.unitary_hess_mat;
66  }
67 
68  return *this;
69  }
70 
71  ~hess (void) = default;
72 
73  T hess_matrix (void) const { return hess_mat; }
74 
75  T unitary_hess_matrix (void) const { return unitary_hess_mat; }
76 
77  private:
78 
81 
82  octave_idx_type init (const T& a);
83  };
84 
85  template <typename T>
86  extern std::ostream&
87  operator << (std::ostream& os, const hess<T>& a);
88  }
89 }
90 
91 #endif
hess(void)
Definition: hess.h:40
hess(const hess &a)
Definition: hess.h:56
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:400
T unitary_hess_mat
Definition: hess.h:80
hess(const T &a)
Definition: hess.h:44
T unitary_hess_matrix(void) const
Definition: hess.h:75
T hess_matrix(void) const
Definition: hess.h:73
hess(const T &a, octave_idx_type &info)
Definition: hess.h:50