Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
juobs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Javier Ugarrio
juobs
Commits
3c0f634e
Commit
3c0f634e
authored
Dec 04, 2020
by
Alessandro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying to understand how to propagate errors
parent
f3b82863
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
src/juobs_linalg.jl
src/juobs_linalg.jl
+12
-5
No files found.
src/juobs_linalg.jl
View file @
3c0f634e
...
...
@@ -23,7 +23,6 @@ for op in (:eigvals, :eigvecs)
end
end
##
@doc
raw
"""
get_matrix(corr_diag::Vector{Array}, corr_upper::Vector{Array} )
...
...
@@ -191,7 +190,7 @@ function uweigvals(a::Matrix{uwreal}; iter = 30)
q_k
,
r_k
=
qr
(
a
)
a
=
uwdot
(
r_k
,
q_k
)
end
return
a
#
get_diag(a)
return
get_diag
(
a
)
end
function
uweigvals
(
a
::
Matrix
{
uwreal
},
b
::
Matrix
{
uwreal
};
iter
=
30
)
c
=
uwdot
(
invert
(
b
),
a
)
...
...
@@ -200,10 +199,9 @@ function uweigvals(a::Matrix{uwreal}, b::Matrix{uwreal}; iter = 30)
q_k
,
r_k
=
qr
(
c
)
c
=
uwdot
(
r_k
,
q_k
)
end
return
c
#
get_diag(c)
return
get_diag
(
c
)
end
function
uweigvecs
(
a
::
Matrix
{
uwreal
};
iter
=
30
)
n
=
size
(
a
,
1
)
u
=
idty
(
n
)
...
...
@@ -225,11 +223,12 @@ function uweigvecs(a::Matrix{uwreal}, b::Matrix{uwreal}; iter = 30)
end
return
u
end
function
uweigen
(
a
::
Matrix
{
uwreal
};
iter
=
30
)
return
uweigvals
(
a
,
iter
=
iter
),
uweigvecs
(
a
,
iter
=
iter
)
end
function
uweigen
(
a
::
Matrix
{
uwreal
},
b
::
Matrix
{
uwreal
};
iter
=
30
)
return
uweigvals
(
a
,
b
,
iter
=
iter
),
uweigvecs
(
a
,
b
,
iter
=
iter
)
return
uweigvals
(
a
,
b
,
iter
=
iter
),
uweigvecs
(
a
,
b
,
iter
=
iter
)
end
function
norm_evec
(
evec
::
Matrix
{
uwreal
},
ctnot
::
Matrix
{
uwreal
})
...
...
@@ -249,6 +248,14 @@ function get_diag(a::Matrix{uwreal})
res
=
[
a
[
k
,
k
]
for
k
=
1
:
n
]
return
res
end
function
get_diag
(
v
::
Vector
{
uwreal
})
n
=
length
(
v
)
res
=
idty
(
n
)
for
i
=
1
:
n
res
[
i
,
i
]
=
v
[
i
]
end
return
res
end
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment