Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103004598
pod_engine_base.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 09:19
Size
2 KB
Mime Type
text/x-python
Expires
Fri, Feb 28, 09:19 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
24476198
Attached To
R6746 RationalROMPy
pod_engine_base.py
View Options
# Copyright (C) 2018 by the RROMPy authors
#
# This file is part of RROMPy.
#
# RROMPy is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RROMPy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with RROMPy. If not, see <http://www.gnu.org/licenses/>.
#
from
rrompy.utilities.base.types
import
HS1D
,
HS2D
,
Tuple
__all__
=
[
'PODEngineBase'
]
class
PODEngineBase
:
"""
POD engine for general matrix orthogonalization. ABSTRACT.
"""
def
name
(
self
)
->
str
:
return
self
.
__class__
.
__name__
def
__str__
(
self
)
->
str
:
return
self
.
name
()
def
norm
(
self
,
a
:
HS1D
)
->
float
:
"""Compute norm of a Hilbert space object."""
pass
def
GS
(
self
,
a
:
HS1D
,
Q
:
HS2D
,
n
:
int
=
None
,
aA
:
HS1D
=
None
,
QA
:
HS2D
=
None
)
->
Tuple
[
HS1D
,
HS1D
,
HS1D
]:
"""
Compute 1 Gram-Schmidt step with given projector.
Args:
a: Hilbert space object to be projected;
Q: orthogonal projection Hilbert space quasi-matrix;
n: number of columns of Q to be considered;
aA: augmented components of Hilbert space object to be projected;
QA: augmented components of Hilbert space object projection
quasi-matrix.
Returns:
Resulting normalized Hilbert space object, coefficients of a wrt
the updated basis.
"""
pass
def
QRGramSchmidt
(
self
,
A
:
HS2D
,
only_R
:
bool
=
False
)
->
Tuple
[
HS1D
,
HS1D
]:
"""
Compute QR decomposition of a matrix through Gram-Schmidt method.
Args:
A: Hilbert space quasi-matrix to be decomposed;
only_R(optional): whether to skip reconstruction of Q; defaults to
False.
Returns:
Resulting orthogonal and upper-triangular quasi-factors.
"""
pass
def
QRHouseholder
(
self
,
A
:
HS2D
,
Q0
:
HS2D
=
None
,
only_R
:
bool
=
False
)
->
Tuple
[
HS1D
,
HS1D
]:
"""
Compute QR decomposition of a matrix through Householder method.
Args:
A: Hilbert space quasi-matrix to be decomposed;
Q0(optional): initial orthogonal guess for Q; defaults to random;
only_R(optional): whether to skip reconstruction of Q; defaults to
False.
Returns:
Resulting (orthogonal and )upper-triangular quasi-factor(s).
"""
pass
Event Timeline
Log In to Comment