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
1e779224
Commit
1e779224
authored
9 years ago
by
Wuttke, Joachim
Committed by
Wuttke, Joachim
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
inline some vector element accessors
parent
e2c3cd32
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pub/lib/obj.hpp
+21
-21
21 additions, 21 deletions
pub/lib/obj.hpp
with
21 additions
and
21 deletions
pub/lib/obj.hpp
+
21
−
21
View file @
1e779224
...
...
@@ -51,15 +51,15 @@ class CObjInt : public CObjNum {
int
val
;
//!< Scalar value.
CObjInt
(
int
_val
)
:
CObjNum
(),
val
(
_val
)
{};
// PObj clone() const { return PObjInt( new CObjInt( *this ) ); };
bool
has_err
()
const
{
return
false
;
};
char
base_type
()
const
{
return
'i'
;
};
inline
bool
has_err
()
const
{
return
false
;
};
inline
char
base_type
()
const
{
return
'i'
;
};
string
result_info
()
const
{
return
"CObjInt("
+
S
(
val
)
+
")"
;
};
double
to_r
()
const
{
return
val
;
};
double
to_r
(
int
i
)
const
{
return
val
;
};
int
to_i
()
const
{
return
val
;
};
int
to_i
(
int
i
)
const
{
return
val
;
};
inline
double
to_r
()
const
{
return
val
;
};
inline
double
to_r
(
int
i
)
const
{
return
val
;
};
inline
int
to_i
()
const
{
return
val
;
};
inline
int
to_i
(
int
i
)
const
{
return
val
;
};
string
to_s
(
int
maxlen
=
12
,
int
minlen
=
1
,
int
prec
=
6
)
const
;
bool
to_b
()
const
{
return
val
;
};
inline
bool
to_b
()
const
{
return
val
;
};
};
//! Data container holding a single floating-point number.
...
...
@@ -69,11 +69,11 @@ class CObjDbl : public CObjNum {
double
val
;
//!< Scalar value.
CObjDbl
(
double
_val
=
NAN
)
:
CObjNum
(),
val
(
_val
)
{};
// PObj clone() const { return PObjDbl( new CObjDbl( *this ) ); };
bool
has_err
()
const
{
return
false
;
};
char
base_type
()
const
{
return
'd'
;
};
inline
bool
has_err
()
const
{
return
false
;
};
inline
char
base_type
()
const
{
return
'd'
;
};
string
result_info
()
const
;
double
to_r
()
const
{
return
val
;
};
double
to_r
(
int
i
)
const
{
return
val
;
};
inline
double
to_r
()
const
{
return
val
;
};
inline
double
to_r
(
int
i
)
const
{
return
val
;
};
string
to_s
(
int
maxlen
=
12
,
int
minlen
=
1
,
int
prec
=
6
)
const
;
bool
to_b
()
const
{
return
val
;
};
};
...
...
@@ -86,13 +86,13 @@ class CObjEnu : public CObjDbl {
double
err
;
//!< Error of scalar value.
CObjEnu
(
double
_val
=
NAN
,
double
_err
=
NAN
)
:
CObjDbl
(
_val
),
err
(
_err
)
{};
// PObj clone() const { return PObjEnu( new CObjEnu( *this ) ); };
bool
has_err
()
const
{
return
true
;
};
char
base_type
()
const
{
return
'e'
;
};
inline
bool
has_err
()
const
{
return
true
;
};
inline
char
base_type
()
const
{
return
'e'
;
};
string
result_info
()
const
;
double
to_r
()
const
{
return
val
;
};
double
to_dr
()
const
{
return
err
;
}
;
double
to_r
(
int
i
)
const
{
return
val
;
};
double
to_dr
(
int
i
)
const
{
return
err
;
}
;
inline
double
to_r
()
const
{
return
val
;
};
inline
double
to_dr
()
const
{
return
err
;
}
;
inline
double
to_r
(
int
i
)
const
{
return
val
;
};
inline
double
to_dr
(
int
i
)
const
{
return
err
;
}
;
string
to_s
(
int
maxlen
=
12
,
int
minlen
=
1
,
int
prec
=
6
)
const
;
bool
to_b
()
const
{
return
val
;
};
};
...
...
@@ -144,8 +144,8 @@ class CObjVecInt : public CObjVecNum {
bool
has_err
()
const
{
return
false
;
};
char
base_type
()
const
{
return
'i'
;
};
string
result_info
()
const
;
int
to_i
(
int
i
)
const
{
return
v
[
i
];
};
double
to_r
(
int
i
)
const
{
return
v
[
i
];
};
inline
int
to_i
(
int
i
)
const
{
return
v
[
i
];
};
inline
double
to_r
(
int
i
)
const
{
return
v
[
i
];
};
string
to_s
(
int
maxlen
=
12
,
int
minlen
=
1
,
int
prec
=
6
)
const
;
bool
to_b
()
const
{
return
v
.
size
();
};
int
size
()
const
{
return
v
.
size
();
};
...
...
@@ -163,7 +163,7 @@ class CObjVecDbl : public CObjVecNum {
bool
has_err
()
const
{
return
false
;
};
char
base_type
()
const
{
return
'd'
;
};
string
result_info
()
const
;
double
to_r
(
int
i
)
const
{
return
v
[
i
];
};
inline
double
to_r
(
int
i
)
const
{
return
v
[
i
];
};
string
to_s
(
int
maxlen
=
12
,
int
minlen
=
1
,
int
prec
=
6
)
const
;
bool
to_b
()
const
{
return
v
.
size
();
};
int
size
()
const
{
return
v
.
size
();
};
...
...
@@ -181,7 +181,7 @@ class CObjVecEnu : public CObjVecDbl {
bool
has_err
()
const
{
return
true
;
};
char
base_type
()
const
{
return
'e'
;
};
string
result_info
()
const
;
double
to_dr
(
int
i
)
const
{
return
dv
[
i
];
}
;
inline
double
to_dr
(
int
i
)
const
{
return
dv
[
i
];
}
;
string
to_s
(
int
maxlen
=
12
,
int
minlen
=
1
,
int
prec
=
6
)
const
;
bool
to_b
()
const
{
return
v
.
size
();
};
int
size
()
const
{
return
v
.
size
();
};
...
...
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