~ubuntu-branches/debian/sid/octave3.0/sid

« back to all changes in this revision

Viewing changes to liboctave/base-lu.h

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere
  • Date: 2007-12-23 16:04:15 UTC
  • Revision ID: james.westby@ubuntu.com-20071223160415-n4gk468dihy22e9v
Tags: upstream-3.0.0
ImportĀ upstreamĀ versionĀ 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 
 
3
Copyright (C) 1996, 1997, 2000, 2002, 2004, 2005, 2007 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_base_lu_h)
 
24
#define octave_base_lu_h 1
 
25
 
 
26
#include "MArray.h"
 
27
 
 
28
template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
 
29
class
 
30
base_lu
 
31
{
 
32
public:
 
33
 
 
34
  base_lu (void) { }
 
35
 
 
36
  base_lu (const base_lu& a) : a_fact (a.a_fact), ipvt (a.ipvt) { }
 
37
 
 
38
  base_lu& operator = (const base_lu& a)
 
39
    {
 
40
      if (this != &a)
 
41
        {
 
42
          a_fact = a.a_fact;
 
43
          ipvt = a.ipvt;
 
44
        }
 
45
      return *this;
 
46
    }
 
47
 
 
48
  ~base_lu (void) { }
 
49
 
 
50
  lu_type L (void) const;
 
51
 
 
52
  lu_type U (void) const;
 
53
 
 
54
  p_type P (void) const;
 
55
 
 
56
protected:
 
57
 
 
58
  lu_type a_fact;
 
59
  MArray<octave_idx_type> ipvt;
 
60
};
 
61
 
 
62
#endif
 
63
 
 
64
/*
 
65
;;; Local Variables: ***
 
66
;;; mode: C++ ***
 
67
;;; End: ***
 
68
*/