Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
239b79bc
Commit
239b79bc
authored
Feb 20, 2012
by
George Zagaris
Browse files
ENH: Implemented "!=" operator
Change-Id: Ib48a8d237fde19fafee96be85fd802b2f7de36a2
parent
4396a228
Changes
2
Hide whitespace changes
Inline
Side-by-side
Filtering/vtkAMRBox.cxx
View file @
239b79bc
...
...
@@ -41,8 +41,8 @@ vtkAMRBox::vtkAMRBox(
int
ihi
,
int
jhi
)
{
this
->
BuildAMRBox
(
ilo
,
jlo
,
0
,
ihi
,
jhi
,
0
);
assert
(
"post: Dimension expected to <= 2"
&&
(
(
this
->
GetDimensionality
()
==
2
)
||
(
this
->
GetDimensionality
()
==
1
)
)
);
//
assert( "post: Dimension expected to <= 2" &&
//
( (this->GetDimensionality()==2) || (this->GetDimensionality()==1) ) );
}
//-----------------------------------------------------------------------------
...
...
@@ -1006,8 +1006,13 @@ bool vtkAMRBox::HasPoint( const double x, const double y, const double z )
//-----------------------------------------------------------------------------
bool
vtkAMRBox
::
operator
==
(
const
vtkAMRBox
&
other
)
{
// TODO: fix this to check for equality of meta-data as well
if
(
this
->
Dimension
!=
other
.
Dimension
)
// TODO: fix this to check for equality of meta-data as well?
if
(
this
->
Dimension
!=
other
.
Dimension
)
{
return
false
;
}
if
(
this
->
BlockLevel
!=
other
.
BlockLevel
)
{
return
false
;
}
...
...
Filtering/vtkAMRBox.h
View file @
239b79bc
...
...
@@ -244,9 +244,18 @@ public:
bool
IsInvalid
()
const
;
// Description:
// Test if this box has the same dimensions as another.
// Test if this box is equal with the box instance on the rhs.
// Note: Two AMR boxes are equal if: (a) they have the same dimensionality
// (b) they are at the same level and (c) they occupy the same index space.
bool
operator
==
(
const
vtkAMRBox
&
other
);
// Description:
// Test if this box is NOT equal with the box instance on the rhs.
// Note: Two AMR boxes are equal if: (a) they have the same dimensionality
// (b) they are at the same level and (c) they occupy the same index space.
bool
operator
!=
(
const
vtkAMRBox
&
other
)
{
return
(
!
(
*
this
==
other
));
}
// Description:
// Determine if the boxes intersect but do not compute
// the intersection
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment