GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
hess.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 1994-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_hess_h)
27#define octave_hess_h 1
28
29#include "octave-config.h"
30
31#include <iosfwd>
32
34
36
37template <typename T>
38class hess
39{
40public:
41
43 : m_hess_mat (), m_unitary_hess_mat ()
44 { }
45
46 hess (const T& a)
47 : m_hess_mat (), m_unitary_hess_mat ()
48 {
49 init (a);
50 }
51
52 hess (const T& a, octave_idx_type& info)
53 : m_hess_mat (), m_unitary_hess_mat ()
54 {
55 info = init (a);
56 }
57
58 hess (const hess& a)
59 : m_hess_mat (a.m_hess_mat), m_unitary_hess_mat (a.m_unitary_hess_mat)
60 { }
61
63 {
64 if (this != &a)
65 {
66 m_hess_mat = a.m_hess_mat;
67 m_unitary_hess_mat = a.m_unitary_hess_mat;
68 }
69
70 return *this;
71 }
72
73 ~hess () = default;
74
75 T hess_matrix () const { return m_hess_mat; }
76
77 T unitary_hess_matrix () const { return m_unitary_hess_mat; }
78
79private:
80
81 T m_hess_mat;
82 T m_unitary_hess_mat;
83
84 OCTAVE_API octave_idx_type init (const T& a);
85};
86
87template <typename T>
88extern OCTAVE_API std::ostream&
89operator << (std::ostream& os, const hess<T>& a);
90
91OCTAVE_END_NAMESPACE(math)
92OCTAVE_END_NAMESPACE(octave)
93
94#endif
Definition hess.h:39
T hess_matrix() const
Definition hess.h:75
T unitary_hess_matrix() const
Definition hess.h:77
~hess()=default
hess(const T &a, octave_idx_type &info)
Definition hess.h:52
hess(const T &a)
Definition hess.h:46
hess & operator=(const hess &a)
Definition hess.h:62
hess()
Definition hess.h:42
hess(const hess &a)
Definition hess.h:58
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::ostream & operator<<(std::ostream &os, const hess< T > &a)
#define OCTAVE_API
Definition main.in.cc:55