Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
Model registry
Operate
Environments
Monitor
Incidents
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
Larry Price
gmsh
Commits
2bb80853
Commit
2bb80853
authored
18 years ago
by
Stefen Guzik
Browse files
Options
Downloads
Patches
Plain Diff
new != operator removed some unused functors
parent
cbc673c1
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
Geo/MEdge.h
+8
-28
8 additions, 28 deletions
Geo/MEdge.h
with
8 additions
and
28 deletions
Geo/MEdge.h
+
8
−
28
View file @
2bb80853
...
...
@@ -65,6 +65,14 @@ class MEdge {
}
};
//--Operators for comparing edges
inline
bool
operator
!=
(
const
MEdge
&
e1
,
const
MEdge
&
e2
)
{
return
(
e1
.
getMinVertex
()
!=
e2
.
getMinVertex
()
||
e1
.
getMaxVertex
()
!=
e2
.
getMaxVertex
());
}
//--The following function objects compare the addresses of the mesh vertices.
//--Equal, Less, and a Hash are defined.
...
...
@@ -76,14 +84,6 @@ struct Equal_Edge : public std::binary_function<MEdge, MEdge, bool> {
}
};
struct
Equal_EdgePtr
:
public
std
::
binary_function
<
MEdge
*
,
MEdge
*
,
bool
>
{
bool
operator
()(
const
MEdge
*
const
e1
,
const
MEdge
*
const
e2
)
const
{
return
(
e1
->
getMinVertex
()
==
e2
->
getMinVertex
()
&&
e1
->
getMaxVertex
()
==
e2
->
getMaxVertex
());
}
};
struct
Less_Edge
:
public
std
::
binary_function
<
MEdge
,
MEdge
,
bool
>
{
bool
operator
()(
const
MEdge
&
e1
,
const
MEdge
&
e2
)
const
{
...
...
@@ -94,16 +94,6 @@ struct Less_Edge : public std::binary_function<MEdge, MEdge, bool> {
}
};
struct
Less_EdgePtr
:
public
std
::
binary_function
<
MEdge
*
,
MEdge
*
,
bool
>
{
bool
operator
()(
const
MEdge
*
const
e1
,
const
MEdge
*
const
e2
)
const
{
if
(
e1
->
getMinVertex
()
<
e2
->
getMinVertex
())
return
true
;
if
(
e1
->
getMinVertex
()
>
e2
->
getMinVertex
())
return
false
;
if
(
e1
->
getMaxVertex
()
<
e2
->
getMaxVertex
())
return
true
;
return
false
;
}
};
struct
Hash_Edge
:
public
std
::
unary_function
<
MEdge
,
size_t
>
{
size_t
operator
()(
const
MEdge
&
e
)
const
{
...
...
@@ -114,14 +104,4 @@ struct Hash_Edge : public std::unary_function<MEdge, size_t> {
}
};
struct
Hash_EdgePtr
:
public
std
::
unary_function
<
MEdge
*
,
size_t
>
{
size_t
operator
()(
const
MEdge
*
const
e
)
const
{
const
MVertex
*
v
[
2
];
v
[
0
]
=
e
->
getMinVertex
();
v
[
1
]
=
e
->
getMaxVertex
();
return
HashFNV1a
<
sizeof
(
MVertex
*
[
2
])
>::
eval
(
v
);
}
};
#endif
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