GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
floatSCHUR.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2015 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 the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 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 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if !defined (octave_floatSCHUR_h)
24 #define octave_floatSCHUR_h 1
25 
26 #include <iosfwd>
27 #include <string>
28 
29 #include "fMatrix.h"
30 
31 class
32 OCTAVE_API
34 {
35 public:
36 
37  FloatSCHUR (void) : schur_mat (), unitary_mat (), selector (0) { }
38 
39  FloatSCHUR (const FloatMatrix& a, const std::string& ord,
40  bool calc_unitary = true)
41  : schur_mat (), unitary_mat (), selector (0)
42  {
43  init (a, ord, calc_unitary);
44  }
45 
46  FloatSCHUR (const FloatMatrix& a, const std::string& ord, int& info,
47  bool calc_unitary = true)
48  : schur_mat (), unitary_mat (), selector (0)
49  {
50  info = init (a, ord, calc_unitary);
51  }
52 
54  : schur_mat (a.schur_mat), unitary_mat (a.unitary_mat), selector (0)
55  { }
56 
57  FloatSCHUR (const FloatMatrix& s, const FloatMatrix& u);
58 
60  {
61  if (this != &a)
62  {
63  schur_mat = a.schur_mat;
64  unitary_mat = a.unitary_mat;
65  }
66  return *this;
67  }
68 
69  ~FloatSCHUR (void) { }
70 
71  FloatMatrix schur_matrix (void) const { return schur_mat; }
72 
73  FloatMatrix unitary_matrix (void) const { return unitary_mat; }
74 
75  friend std::ostream& operator << (std::ostream& os, const FloatSCHUR& a);
76 
77  typedef octave_idx_type (*select_function) (const float&, const float&);
78 
79 private:
80 
83 
84  select_function selector;
85 
86  octave_idx_type init (const FloatMatrix& a, const std::string& ord,
87  bool calc_unitary);
88 };
89 
90 #endif
FloatSCHUR(const FloatSCHUR &a)
Definition: floatSCHUR.h:53
FloatComplexNDArray & operator=(const FloatComplexNDArray &a)
Definition: fCNDArray.h:56
FloatSCHUR(const FloatMatrix &a, const std::string &ord, int &info, bool calc_unitary=true)
Definition: floatSCHUR.h:46
FloatMatrix schur_matrix(void) const
Definition: floatSCHUR.h:71
select_function selector
Definition: floatSCHUR.h:84
FloatMatrix unitary_matrix(void) const
Definition: floatSCHUR.h:73
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
FloatMatrix schur_mat
Definition: floatSCHUR.h:81
FloatSCHUR(const FloatMatrix &a, const std::string &ord, bool calc_unitary=true)
Definition: floatSCHUR.h:39
FloatSCHUR(void)
Definition: floatSCHUR.h:37
FloatMatrix unitary_mat
Definition: floatSCHUR.h:82
~FloatSCHUR(void)
Definition: floatSCHUR.h:69