Ipopt
3.11.4
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
src
LinAlg
IpTransposeMatrix.hpp
Go to the documentation of this file.
1
// Copyright (C) 2008 International Business Machines and others.
2
// All Rights Reserved.
3
// This code is published under the Eclipse Public License.
4
//
5
// $Id: IpTransposeMatrix.hpp 1861 2010-12-21 21:34:47Z andreasw $
6
//
7
// Authors: Andreas Waechter IBM 2008-08-25
8
9
#ifndef __IPTRANSPOSEMATRIX_HPP__
10
#define __IPTRANSPOSEMATRIX_HPP__
11
12
#include "
IpMatrix.hpp
"
13
14
namespace
Ipopt
15
{
16
17
/* forward declarations */
18
class
TransposeMatrixSpace;
19
23
class
TransposeMatrix
:
public
Matrix
24
{
25
public
:
26
29
32
TransposeMatrix
(
const
TransposeMatrixSpace
* owner_space);
33
35
~TransposeMatrix
()
36
{}
37
38
SmartPtr<const Matrix>
OrigMatrix
()
const
39
{
40
return
ConstPtr
(
orig_matrix_
);
41
}
43
44
protected
:
47
virtual
void
MultVectorImpl
(
Number
alpha,
const
Vector
&
x
,
48
Number
beta,
Vector
& y)
const
49
{
50
DBG_ASSERT
(
IsValid
(
orig_matrix_
));
51
orig_matrix_
->TransMultVector(alpha, x, beta, y);
52
}
53
54
virtual
void
TransMultVectorImpl
(
Number
alpha,
const
Vector
&
x
,
55
Number
beta,
Vector
& y)
const
56
{
57
DBG_ASSERT
(
IsValid
(
orig_matrix_
));
58
orig_matrix_
->MultVector(alpha, x, beta, y);
59
}
60
63
virtual
bool
HasValidNumbersImpl
()
const
64
{
65
DBG_ASSERT
(
IsValid
(
orig_matrix_
));
66
return
orig_matrix_
->HasValidNumbers();
67
}
68
69
virtual
void
ComputeRowAMaxImpl
(
Vector
& rows_norms,
bool
init)
const
70
{
71
DBG_ASSERT
(
IsValid
(
orig_matrix_
));
72
orig_matrix_
->ComputeColAMax(rows_norms, init);
73
}
74
75
virtual
void
ComputeColAMaxImpl
(
Vector
& rows_norms,
bool
init)
const
76
{
77
DBG_ASSERT
(
IsValid
(
orig_matrix_
));
78
orig_matrix_
->ComputeRowAMax(rows_norms, init);
79
}
80
81
virtual
void
PrintImpl
(
const
Journalist
& jnlst,
82
EJournalLevel
level,
83
EJournalCategory
category,
84
const
std::string& name,
85
Index
indent,
86
const
std::string& prefix)
const
;
88
89
private
:
99
TransposeMatrix
();
100
102
TransposeMatrix
(
const
TransposeMatrix
&);
103
105
void
operator=
(
const
TransposeMatrix
&);
107
109
SmartPtr<Matrix>
orig_matrix_
;
110
};
111
113
class
TransposeMatrixSpace
:
public
MatrixSpace
114
{
115
public
:
119
TransposeMatrixSpace
(
const
MatrixSpace
* orig_matrix_space)
120
:
121
MatrixSpace
(orig_matrix_space->
NCols
(), orig_matrix_space->
NRows
()),
122
orig_matrix_space_
(orig_matrix_space)
123
{}
124
126
virtual
~TransposeMatrixSpace
()
127
{}
129
132
virtual
Matrix
*
MakeNew
()
const
133
{
134
return
MakeNewTransposeMatrix
();
135
}
136
138
TransposeMatrix
*
MakeNewTransposeMatrix
()
const
139
{
140
return
new
TransposeMatrix
(
this
);
141
}
142
143
Matrix
*
MakeNewOrigMatrix
()
const
144
{
145
return
orig_matrix_space_
->MakeNew();
146
}
147
148
private
:
158
TransposeMatrixSpace
();
159
161
TransposeMatrixSpace
(
const
TransposeMatrixSpace
&);
162
164
void
operator=
(
const
TransposeMatrixSpace
&);
166
168
SmartPtr<const MatrixSpace>
orig_matrix_space_
;
169
};
170
171
}
// namespace Ipopt
172
#endif
Generated on Mon Oct 21 2013 19:08:15 for Ipopt by
1.8.4