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
a37f69c4
Commit
a37f69c4
authored
8 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
Refined curve plotting good enough.
parent
b087be60
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
pub/CHANGELOG
+2
-0
2 additions, 0 deletions
pub/CHANGELOG
pub/itest/curveplot.f2t
+2
-1
2 additions, 1 deletion
pub/itest/curveplot.f2t
pub/lib/plot.cpp
+2
-6
2 additions, 6 deletions
pub/lib/plot.cpp
pub/plot/dualplot.cpp
+1
-1
1 addition, 1 deletion
pub/plot/dualplot.cpp
with
7 additions
and
8 deletions
pub/CHANGELOG
+
2
−
0
View file @
a37f69c4
...
...
@@ -3,10 +3,12 @@ Release 2.3.6a of :
- Bug fixes:
- Restored ability to load files from outside the current working directory
- New functionality:
- Command crp to restrict plot range
- New integral operations firstwith, lastwith
- Improved functionality:
- Commands gp, gf let user confirm or overwrite graphic file name
- Integral operations now return integers when appropriate
- Cleaner implementation of refined curve plotting
- Code cleanup:
- fname_divide replaced by functions from std::experimental::filesystem
...
...
This diff is collapsed.
Click to expand it.
pub/itest/curveplot.f2t
+
2
−
1
View file @
a37f69c4
#!/usr/bin/env frida
! rm -f /tmp/fridatestplot.ps
pshead="g3wallpaper.ps"
gnc 100
cca p0+p1*t
g0
gx 0 1
...
...
@@ -24,7 +25,7 @@ p
gfa /tmp/fridatestplot.ps
op0 768.34
op1 0
crp t<.52
3
||.5
24
<t&&t<.61
3
||.6
2
5<t
crp t<.52||.5
3
<t&&t<.61||.65<t
gya
p
gfa /tmp/fridatestplot.ps
...
...
This diff is collapsed.
Click to expand it.
pub/lib/plot.cpp
+
2
−
6
View file @
a37f69c4
...
...
@@ -278,7 +278,6 @@ public:
int
plot_curve_refine
(
CPlot
*
plot
,
const
COlc
*
fc
,
int
k
,
int
j
,
int
cstyle
)
{
printf
(
"
\n
DEBUG REFINE
\n
"
);
auto
x2p
=
[
&
](
const
vector
<
double
>&
x
)
->
vector
<
CPt
>
{
vector
<
double
>
y
=
PCAST
<
const
CObjVecDbl
>
(
fc
->
eval_curve
(
x
,
k
,
j
,
false
))
->
v
;
vector
<
int
>
inRange
=
fc
->
eval_prange
(
x
,
k
,
j
)
->
v
;
...
...
@@ -304,13 +303,11 @@ int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle)
// refinement loop:
vector
<
CPt
>
pp
;
for
(
int
iref
=
0
;
iref
<
13
&&
pp
.
size
()
<
plot
->
maxpoints
;
++
iref
)
{
for
(
int
iref
=
0
;
iref
<
20
&&
pp
.
size
()
<
plot
->
maxpoints
;
++
iref
)
{
vector
<
CPt
>
pn
=
x2p
(
xn
);
printf
(
"DEBUG %2i #pp=%6zu #pn=%6zu
\n
"
,
iref
,
pp
.
size
(),
pn
.
size
()
);
pp
=
triv
::
merge_sorted
(
pp
,
pn
,
pt_order
);
xn
.
clear
();
// detect jumps:
auto
a
=
pp
.
begin
();
auto
b
=
pp
.
begin
()
+
1
;
vector
<
CPt
>
po
=
{
*
a
};
...
...
@@ -323,7 +320,7 @@ int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle)
if
(
c
<
pp
.
end
()
&&
c
->
code
==
0
)
{
if
(
std
::
abs
(
((
b
->
xp
-
a
->
xp
)
*
c
->
yp
+
(
c
->
xp
-
b
->
xp
)
*
a
->
yp
)
/
(
c
->
xp
-
a
->
xp
)
-
b
->
yp
)
<
1e-6
)
/
(
c
->
xp
-
a
->
xp
)
-
b
->
yp
)
<
1e-6
)
// it's linear
continue
;
// don't copy *b to po
}
if
(
hypot
(
b
->
xp
-
a
->
xp
,
b
->
yp
-
a
->
yp
)
>
1e-1
)
...
...
@@ -331,7 +328,6 @@ int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle)
}
po
.
push_back
(
*
b
);
}
printf
(
"DEBUG -> #pp=%6zu #po=%6zu #xn=%6zu
\n
"
,
pp
.
size
(),
po
.
size
(),
xn
.
size
()
);
pp
=
po
;
if
(
!
xn
.
size
())
break
;
...
...
This diff is collapsed.
Click to expand it.
pub/plot/dualplot.cpp
+
1
−
1
View file @
a37f69c4
...
...
@@ -39,7 +39,7 @@ CPlot::CPlot(int _iPlot, bool _logx, bool _logy)
,
Y
(
"y"
,
_logy
)
,
maxpoints
(
20000
)
,
with_errors
(
true
)
,
equipoints
(
49
)
,
equipoints
(
120
)
,
refine
(
true
)
{
// == Initialization for Gnuplot ==
...
...
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