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
15e017ec
Commit
15e017ec
authored
Dec 16, 2020
by
Javier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
println + return nothing -> error
parent
d1718d1d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
20 deletions
+10
-20
src/juobs_linalg.jl
src/juobs_linalg.jl
+2
-4
src/juobs_obs.jl
src/juobs_obs.jl
+1
-2
src/juobs_reader.jl
src/juobs_reader.jl
+1
-2
src/juobs_tools.jl
src/juobs_tools.jl
+5
-10
src/juobs_types.jl
src/juobs_types.jl
+1
-2
No files found.
src/juobs_linalg.jl
View file @
15e017ec
...
@@ -56,8 +56,7 @@ function get_matrix(corr_diag::Vector{Vector{uwreal}}, corr_upper::Vector{Vector
...
@@ -56,8 +56,7 @@ function get_matrix(corr_diag::Vector{Vector{uwreal}}, corr_upper::Vector{Vector
n
=
length
(
corr_diag
)
# matrix dimension
n
=
length
(
corr_diag
)
# matrix dimension
d
=
length
(
corr_upper
)
# upper elements
d
=
length
(
corr_upper
)
# upper elements
if
d
!=
(
n
*
(
n
-
1
)
/
2
)
if
d
!=
(
n
*
(
n
-
1
)
/
2
)
println
(
"Error get_matrix"
)
error
(
"Error get_matrix"
)
return
nothing
end
end
res
=
Vector
{
Matrix
}(
undef
,
time
)
# array with all the matrices at each time step.
res
=
Vector
{
Matrix
}(
undef
,
time
)
# array with all the matrices at each time step.
aux
=
Matrix
{
uwreal
}(
undef
,
n
,
n
)
aux
=
Matrix
{
uwreal
}(
undef
,
n
,
n
)
...
@@ -388,8 +387,7 @@ function uwdot(a::Matrix{uwreal}, b::Matrix{uwreal})
...
@@ -388,8 +387,7 @@ function uwdot(a::Matrix{uwreal}, b::Matrix{uwreal})
k
,
p
=
size
(
b
)
k
,
p
=
size
(
b
)
c
=
Matrix
{
uwreal
}(
undef
,
n
,
p
)
c
=
Matrix
{
uwreal
}(
undef
,
n
,
p
)
if
m
!=
k
if
m
!=
k
println
(
"Error uwdot"
)
error
(
"Error uwdot"
)
return
nothing
end
end
for
i
=
1
:
n
for
i
=
1
:
n
for
j
=
1
:
p
for
j
=
1
:
p
...
...
src/juobs_obs.jl
View file @
15e017ec
...
@@ -200,8 +200,7 @@ function comp_t0(Y::Vector{YData}, plat::Vector{Int64}; L::Int64, pl::Bool=false
...
@@ -200,8 +200,7 @@ function comp_t0(Y::Vector{YData}, plat::Vector{Int64}; L::Int64, pl::Bool=false
replica
=
length
.
(
vtr
)
replica
=
length
.
(
vtr
)
if
!
all
(
id
.==
id
[
1
])
if
!
all
(
id
.==
id
[
1
])
println
(
"IDs are not equal"
)
error
(
"IDs are not equal"
)
return
nothing
end
end
Ysl
=
isnothing
(
rw
)
?
Ysl
:
apply_rw
(
Ysl
,
rw
)
Ysl
=
isnothing
(
rw
)
?
Ysl
:
apply_rw
(
Ysl
,
rw
)
...
...
src/juobs_reader.jl
View file @
15e017ec
...
@@ -168,8 +168,7 @@ function read_rw(path::String; v::String="1.2")
...
@@ -168,8 +168,7 @@ function read_rw(path::String; v::String="1.2")
nfct
=
ones
(
Int32
,
nrw
)
nfct
=
ones
(
Int32
,
nrw
)
nfct_inheader
=
0
nfct_inheader
=
0
else
else
println
(
"Error: Version not supported"
)
error
(
"Version not supported"
)
return
nothing
end
end
nsrc
=
Array
{
Int32
}(
undef
,
nrw
)
nsrc
=
Array
{
Int32
}(
undef
,
nrw
)
read!
(
data
,
nsrc
)
read!
(
data
,
nsrc
)
...
...
src/juobs_tools.jl
View file @
15e017ec
...
@@ -79,8 +79,7 @@ function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array
...
@@ -79,8 +79,7 @@ function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array
replica
=
Int64
.
(
maximum
.
(
vcfg
))
replica
=
Int64
.
(
maximum
.
(
vcfg
))
if
!
all
(
id
.==
id
[
1
])
if
!
all
(
id
.==
id
[
1
])
println
(
"IDs are not equal"
)
error
(
"IDs are not equal"
)
return
nothing
end
end
real
?
data
=
getfield
.
(
cdata
,
:
re_data
)
./
L
^
3
:
data
=
getfield
.
(
cdata
,
:
im_data
)
./
L
^
3
real
?
data
=
getfield
.
(
cdata
,
:
re_data
)
./
L
^
3
:
data
=
getfield
.
(
cdata
,
:
im_data
)
./
L
^
3
...
@@ -141,28 +140,24 @@ function md_sea(a::uwreal, md::Vector{Matrix{Float64}}, ws::ADerrors.wspace=ADer
...
@@ -141,28 +140,24 @@ function md_sea(a::uwreal, md::Vector{Matrix{Float64}}, ws::ADerrors.wspace=ADer
p
=
findall
(
t
->
t
==
1
,
a
.
prop
)
p
=
findall
(
t
->
t
==
1
,
a
.
prop
)
if
nid
!=
1
if
nid
!=
1
println
(
"Error: neid > 1"
)
error
(
"neid > 1"
)
return
nothing
end
end
id
=
ws
.
map_nob
[
p
]
id
=
ws
.
map_nob
[
p
]
if
!
all
(
id
.==
id
[
1
])
if
!
all
(
id
.==
id
[
1
])
println
(
"ids do not match"
)
error
(
"ids do not match"
)
return
nothing
end
end
id
=
id
[
1
]
id
=
id
[
1
]
ivrep
=
getfield
.
(
ws
.
fluc
[
p
],
:
ivrep
)
ivrep
=
getfield
.
(
ws
.
fluc
[
p
],
:
ivrep
)
ivrep1
=
fill
(
ivrep
[
1
],
length
(
ivrep
))
ivrep1
=
fill
(
ivrep
[
1
],
length
(
ivrep
))
if
!
all
(
ivrep
.==
ivrep1
)
if
!
all
(
ivrep
.==
ivrep1
)
println
(
"ivreps do not match"
)
error
(
"ivreps do not match"
)
return
nothing
end
end
ivrep
=
ivrep
[
1
]
ivrep
=
ivrep
[
1
]
if
length
(
md
)
!=
length
(
ivrep
)
if
length
(
md
)
!=
length
(
ivrep
)
println
(
"Nr obs != Nr md"
)
error
(
"Nr obs != Nr md"
)
return
nothing
end
end
md_aux
=
md
[
1
][
:
,
1
:
ivrep
[
1
]]
md_aux
=
md
[
1
][
:
,
1
:
ivrep
[
1
]]
...
...
src/juobs_types.jl
View file @
15e017ec
...
@@ -127,8 +127,7 @@ mutable struct Corr
...
@@ -127,8 +127,7 @@ mutable struct Corr
h
=
getfield
.
(
b
,
:
header
)
h
=
getfield
.
(
b
,
:
header
)
for
s
in
sym
for
s
in
sym
if
!
all
(
getfield
.
(
h
,
s
)
.==
getfield
(
h
[
1
],
s
))
if
!
all
(
getfield
.
(
h
,
s
)
.==
getfield
(
h
[
1
],
s
))
println
(
"Corr: Parameter mismatch"
)
error
(
"Corr: Parameter mismatch"
)
return
nothing
end
end
end
end
mu
=
[
h
[
1
]
.
mu1
,
h
[
1
]
.
mu2
]
mu
=
[
h
[
1
]
.
mu1
,
h
[
1
]
.
mu2
]
...
...
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