Main Page
Namespaces
Classes
Files
File List
File Members
var
build
temp
tmp.niCloInx4p
4.0-0-0
coinor-ipopt
coinor-ipopt-3.10.2
Ipopt
src
LinAlg
IpSymMatrix.hpp
Go to the documentation of this file.
1
// Copyright (C) 2004, 2008 International Business Machines and others.
2
// All Rights Reserved.
3
// This code is published under the Eclipse Public License.
4
//
5
// $Id: IpSymMatrix.hpp 1861 2010-12-21 21:34:47Z andreasw $
6
//
7
// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8
9
#ifndef __IPSYMMATRIX_HPP__
10
#define __IPSYMMATRIX_HPP__
11
12
#include "
IpUtils.hpp
"
13
#include "
IpMatrix.hpp
"
14
15
namespace
Ipopt
16
{
17
18
/* forward declarations */
19
class
SymMatrixSpace;
20
23
class
SymMatrix
:
public
Matrix
24
{
25
public
:
30
SymMatrix
(
const
SymMatrixSpace
* owner_space);
31
33
virtual
~SymMatrix
()
34
{}
36
40
Index
Dim
()
const
;
42
43
SmartPtr<const SymMatrixSpace>
OwnerSymMatrixSpace
()
const
;
44
45
protected
:
53
virtual
void
TransMultVectorImpl
(
Number
alpha,
const
Vector
&
x
,
Number
beta,
54
Vector
& y)
const
55
{
56
// Since this matrix is symetric, this is the same operation as
57
// MultVector
58
MultVector
(alpha, x, beta, y);
59
}
62
virtual
void
ComputeColAMaxImpl
(
Vector
& cols_norms,
bool
init)
const
63
{
64
ComputeRowAMaxImpl
(cols_norms, init);
65
}
67
68
private
:
72
const
SymMatrixSpace
*
owner_space_
;
73
};
74
75
78
class
SymMatrixSpace
:
public
MatrixSpace
79
{
80
public
:
86
SymMatrixSpace
(
Index
dim)
87
:
88
MatrixSpace
(dim,dim)
89
{}
90
92
virtual
~SymMatrixSpace
()
93
{}
95
98
virtual
SymMatrix
*
MakeNewSymMatrix
()
const
=0;
99
102
virtual
Matrix
*
MakeNew
()
const
103
{
104
return
MakeNewSymMatrix
();
105
}
106
110
Index
Dim
()
const
111
{
112
DBG_ASSERT
(
NRows
() ==
NCols
());
113
return
NRows
();
114
}
115
116
private
:
126
SymMatrixSpace
();
127
128
/* Copy constructor */
129
SymMatrixSpace
(
const
SymMatrixSpace
&);
130
132
SymMatrixSpace
&
operator=
(
const
SymMatrixSpace
&);
134
135
};
136
137
/* inline methods */
138
inline
139
SymMatrix::SymMatrix
(
const
SymMatrixSpace
* owner_space)
140
:
141
Matrix
(owner_space),
142
owner_space_(owner_space)
143
{}
144
145
inline
146
Index
SymMatrix::Dim
()
const
147
{
148
return
owner_space_
->
Dim
();
149
}
150
151
inline
152
SmartPtr<const SymMatrixSpace>
SymMatrix::OwnerSymMatrixSpace
()
const
153
{
154
return
owner_space_
;
155
}
156
157
}
// namespace Ipopt
158
159
#endif
Generated on Mon Mar 17 2014 19:49:13 by
1.8.1.2