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
4 years ago
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
n
=
length
(
corr_diag
)
# matrix dimension
d
=
length
(
corr_upper
)
# upper elements
if
d
!=
(
n
*
(
n
-
1
)
/
2
)
println
(
"Error get_matrix"
)
return
nothing
error
(
"Error get_matrix"
)
end
res
=
Vector
{
Matrix
}(
undef
,
time
)
# array with all the matrices at each time step.
aux
=
Matrix
{
uwreal
}(
undef
,
n
,
n
)
...
...
@@ -388,8 +387,7 @@ function uwdot(a::Matrix{uwreal}, b::Matrix{uwreal})
k
,
p
=
size
(
b
)
c
=
Matrix
{
uwreal
}(
undef
,
n
,
p
)
if
m
!=
k
println
(
"Error uwdot"
)
return
nothing
error
(
"Error uwdot"
)
end
for
i
=
1
:
n
for
j
=
1
:
p
...
...
This diff is collapsed.
Click to expand it.
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
replica
=
length
.
(
vtr
)
if
!
all
(
id
.==
id
[
1
])
println
(
"IDs are not equal"
)
return
nothing
error
(
"IDs are not equal"
)
end
Ysl
=
isnothing
(
rw
)
?
Ysl
:
apply_rw
(
Ysl
,
rw
)
...
...
This diff is collapsed.
Click to expand it.
src/juobs_reader.jl
View file @
15e017ec
...
...
@@ -168,8 +168,7 @@ function read_rw(path::String; v::String="1.2")
nfct
=
ones
(
Int32
,
nrw
)
nfct_inheader
=
0
else
println
(
"Error: Version not supported"
)
return
nothing
error
(
"Version not supported"
)
end
nsrc
=
Array
{
Int32
}(
undef
,
nrw
)
read!
(
data
,
nsrc
)
...
...
This diff is collapsed.
Click to expand it.
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
replica
=
Int64
.
(
maximum
.
(
vcfg
))
if
!
all
(
id
.==
id
[
1
])
println
(
"IDs are not equal"
)
return
nothing
error
(
"IDs are not equal"
)
end
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
p
=
findall
(
t
->
t
==
1
,
a
.
prop
)
if
nid
!=
1
println
(
"Error: neid > 1"
)
return
nothing
error
(
"neid > 1"
)
end
id
=
ws
.
map_nob
[
p
]
if
!
all
(
id
.==
id
[
1
])
println
(
"ids do not match"
)
return
nothing
error
(
"ids do not match"
)
end
id
=
id
[
1
]
ivrep
=
getfield
.
(
ws
.
fluc
[
p
],
:
ivrep
)
ivrep1
=
fill
(
ivrep
[
1
],
length
(
ivrep
))
if
!
all
(
ivrep
.==
ivrep1
)
println
(
"ivreps do not match"
)
return
nothing
error
(
"ivreps do not match"
)
end
ivrep
=
ivrep
[
1
]
if
length
(
md
)
!=
length
(
ivrep
)
println
(
"Nr obs != Nr md"
)
return
nothing
error
(
"Nr obs != Nr md"
)
end
md_aux
=
md
[
1
][
:
,
1
:
ivrep
[
1
]]
...
...
This diff is collapsed.
Click to expand it.
src/juobs_types.jl
View file @
15e017ec
...
...
@@ -127,8 +127,7 @@ mutable struct Corr
h
=
getfield
.
(
b
,
:
header
)
for
s
in
sym
if
!
all
(
getfield
.
(
h
,
s
)
.==
getfield
(
h
[
1
],
s
))
println
(
"Corr: Parameter mismatch"
)
return
nothing
error
(
"Corr: Parameter mismatch"
)
end
end
mu
=
[
h
[
1
]
.
mu1
,
h
[
1
]
.
mu2
]
...
...
This diff is collapsed.
Click to expand it.
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