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
0fc169b8
Commit
0fc169b8
authored
14 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
calculator: k-dependent list iff appropriate
parent
d74191ea
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
pub/CHANGELOG
+1
-1
1 addition, 1 deletion
pub/CHANGELOG
pub/src/calc.cpp
+1
-1
1 addition, 1 deletion
pub/src/calc.cpp
pub/src/edif.cpp
+1
-1
1 addition, 1 deletion
pub/src/edif.cpp
pub/src/expr.cpp
+26
-0
26 additions, 0 deletions
pub/src/expr.cpp
pub/src/expr.h
+2
-0
2 additions, 0 deletions
pub/src/expr.h
with
31 additions
and
3 deletions
pub/CHANGELOG
+
1
−
1
View file @
0fc169b8
...
@@ -2,7 +2,7 @@ Release 2.1.3a
...
@@ -2,7 +2,7 @@ Release 2.1.3a
- interface changes:
- interface changes:
- command modifier "=" (overwrite) must now be appended
- command modifier "=" (overwrite) must now be appended
- calculator mode
no longer separate
: FRIDA _is_ a pocket calculator
- calculator mode
merged with main menu
: FRIDA _is_
now
a pocket calculator
Release 2.1.2a of 20feb11:
Release 2.1.2a of 20feb11:
...
...
This diff is collapsed.
Click to expand it.
pub/src/calc.cpp
+
1
−
1
View file @
0fc169b8
...
@@ -30,7 +30,7 @@ void NCalc::Calculator( string s )
...
@@ -30,7 +30,7 @@ void NCalc::Calculator( string s )
user_xaxparse
(
s
.
c_str
(),
&
T
);
user_xaxparse
(
s
.
c_str
(),
&
T
);
NOlm
::
IterateO
fiter
;
NOlm
::
IterateO
fiter
;
if
(
fiter
.
size
()
==
0
)
{
if
(
fiter
.
size
()
==
0
||
!
T
->
k_dependent
()
)
{
T
->
tree_point_val
(
&
ret
,
&
dret
);
T
->
tree_point_val
(
&
ret
,
&
dret
);
printf
(
"%.12g"
,
ret
);
printf
(
"%.12g"
,
ret
);
if
(
dret
)
if
(
dret
)
...
...
This diff is collapsed.
Click to expand it.
pub/src/edif.cpp
+
1
−
1
View file @
0fc169b8
...
@@ -858,7 +858,7 @@ void NEdif::MakeGrid()
...
@@ -858,7 +858,7 @@ void NEdif::MakeGrid()
S
->
x
.
resize
(
ni
);
S
->
x
.
resize
(
ni
);
for
(
uint
i
=
0
;
i
<
ni
;
++
i
)
for
(
uint
i
=
0
;
i
<
ni
;
++
i
)
S
->
x
[
i
]
=
((
double
)
i
)
/
(
ni
+
1
)
;
S
->
x
[
i
]
=
((
double
)
i
)
/
ni
;
S
->
y
.
clear
();
S
->
y
.
clear
();
S
->
y
.
resize
(
ni
,
0.
);
S
->
y
.
resize
(
ni
,
0.
);
...
...
This diff is collapsed.
Click to expand it.
pub/src/expr.cpp
+
26
−
0
View file @
0fc169b8
...
@@ -465,6 +465,32 @@ void CTree::npar_exec( uint *np ) const
...
@@ -465,6 +465,32 @@ void CTree::npar_exec( uint *np ) const
}
}
//! Does the result depend on k?
bool
CTree
::
k_dependent
()
const
{
bool
kd
=
false
;
kdep_exec
(
&
kd
);
return
kd
;
}
//! Implementation with pointer argument to allow recursion.
void
CTree
::
kdep_exec
(
bool
*
kd
)
const
{
if
(
typ
==
_OP
||
typ
==
_CONV
||
typ
==
_DIRAC
)
for
(
uint
iarg
=
0
;
iarg
<
narg
;
++
iarg
)
arg
[
iarg
]
->
kdep_exec
(
kd
);
else
if
(
typ
==
_VAL
||
typ
==
_DUMMY
||
typ
==
_CEV
)
;
// do nothing
else
if
(
typ
==
_REF
)
{
*
kd
=
true
;
}
else
throw
string
(
"BUG: kdep(UNDEF)"
);
}
//! Does expression contain dummy argument t ?
//! Does expression contain dummy argument t ?
bool
CTree
::
has_dummy
()
const
bool
CTree
::
has_dummy
()
const
...
...
This diff is collapsed.
Click to expand it.
pub/src/expr.h
+
2
−
0
View file @
0fc169b8
...
@@ -108,6 +108,7 @@ class CTree {
...
@@ -108,6 +108,7 @@ class CTree {
static
void
setConv
(
uint
&
kconv
,
uint
&
jconv
,
uint
k
,
uint
j
);
static
void
setConv
(
uint
&
kconv
,
uint
&
jconv
,
uint
k
,
uint
j
);
uint
npar
()
const
;
uint
npar
()
const
;
bool
k_dependent
()
const
;
bool
has_dummy
()
const
;
bool
has_dummy
()
const
;
void
tree_val
(
CResult
&
ret
,
const
CContext
&
ctx
)
const
;
void
tree_val
(
CResult
&
ret
,
const
CContext
&
ctx
)
const
;
...
@@ -125,4 +126,5 @@ class CTree {
...
@@ -125,4 +126,5 @@ class CTree {
private
:
private
:
void
npar_exec
(
uint
*
np
)
const
;
void
npar_exec
(
uint
*
np
)
const
;
void
kdep_exec
(
bool
*
kd
)
const
;
};
};
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