Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Frida
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coenen, Joachim
Frida
Commits
b496661e
Commit
b496661e
authored
15 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
correct cauchy; conv debmsg
parent
44233398
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pub/src/expr.cpp
+5
-3
5 additions, 3 deletions
pub/src/expr.cpp
pub/src/func.cpp
+1
-1
1 addition, 1 deletion
pub/src/func.cpp
with
6 additions
and
4 deletions
pub/src/expr.cpp
+
5
−
3
View file @
b496661e
...
...
@@ -568,6 +568,7 @@ void CTree::tree_val( CTOut *ret, const CContext *ctx ) const
throw
string
(
"2nd arg of conv must be scalar shift"
);
double
shift
=
r
.
d
;
if
(
kconv
==-
1
)
{
printf
(
"DEB no conv %i
\n
"
,
n
);
// Copy convolutand (= unconvoluted theory).
CTOut
r
;
// unconvoluted theory given by arg[0]:
...
...
@@ -575,6 +576,7 @@ void CTree::tree_val( CTOut *ret, const CContext *ctx ) const
for
(
uint
i
=
0
;
i
<
n
;
++
i
)
ret
->
vd
[
i
]
=
r
.
to_d
(
i
)
-
shift
;
}
else
if
(
NRead
::
iofmac
(
"
\\
cv_mode"
)
==-
1
)
{
printf
(
"DEB conv %i %i step %f
\n
"
,
n
,
nv
,
conv_step
);
CTOut
r
;
CContext
cvctx
(
*
ctx
);
vector
<
double
>
tt
;
...
...
@@ -609,8 +611,8 @@ void CTree::tree_val( CTOut *ret, const CContext *ctx ) const
tt
[
i
]
=
(
*
(
ctx
->
fargs
))[
i
]
-
sv
->
x
[
iv
]
-
shift
;
arg
[
0
]
->
tree_val
(
&
r
,
&
cvctx
);
for
(
uint
i
=
0
;
i
<
n
;
++
i
)
ret
->
vd
[
i
]
+=
r
.
to_d
(
i
)
*
dx
*
sv
->
y
[
iv
]
/
conv_norm
;
ret
->
vd
[
i
]
+=
r
.
to_d
(
i
)
*
sv
->
y
[
iv
]
*
dx
/
conv_norm
;
}
}
}
else
{
...
...
@@ -685,6 +687,7 @@ void CTree::tree_val( CTOut *ret, const CContext *ctx ) const
vt
=
rarg
.
vd
;
}
// evaluate function:
printf
(
"DEB set FRF context: %i -> %i,%i; x %f .. %f
\n
"
,
ctx
->
k
,
frf
.
cr
.
k
,
frf
.
cr
.
j
,
vt
[
0
],
vt
[
vt
.
size
()
-
1
]
);
CContext
cu_ctx
(
frf
.
cr
.
k
,
frf
.
cr
.
j
);
cu_ctx
.
set_fargs
(
&
vt
);
frf
.
cr
.
fc
->
T
->
tree_val
(
ret
,
&
cu_ctx
);
...
...
@@ -801,7 +804,6 @@ uint CTree::setConvJ( uint k, uint j, uint kconv ) const
throw
"cannot convolute file "
+
strg
(
k
)
+
" with resolution "
+
strg
(
kconv
)
+
": number of scans does not match"
;
}
}
...
...
This diff is collapsed.
Click to expand it.
pub/src/func.cpp
+
1
−
1
View file @
b496661e
...
...
@@ -117,7 +117,7 @@ double func_gauss (double x, double s) {
double
func_gaussnn
(
double
x
,
double
s
)
{
// Gauss not normalized
return
s
==
0
?
0
:
exp
(
-
x
*
x
/
(
2
*
s
*
s
));
}
double
func_cauchy
(
double
x
,
double
s
)
{
return
s
==
0
?
0
:
2
*
s
/
twopi
/
(
x
*
x
+
s
*
s
);
}
return
s
==
0
?
0
:
2
*
fabs
(
s
)
/
twopi
/
(
x
*
x
+
s
*
s
);
}
double
func_kwwc
(
double
v
,
double
a
){
if
(
a
<
0.1
||
a
>
2.0
)
return
0
;
return
kwwcf
(
(
float
)
v
,
(
float
)
a
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment