Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
caddies
caddies-api
Commits
cc06dea1
Commit
cc06dea1
authored
May 13, 2016
by
Luís de Sousa
Browse files
Added area() method to Grid classes.
parent
d9f7b949
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
impls/hexagonal-cell/1-levels/simple/Grid.hpp
impls/hexagonal-cell/1-levels/simple/Grid.hpp
+9
-0
impls/hexagonal-cell/1-levels/simple/caapi2D.hpp
impls/hexagonal-cell/1-levels/simple/caapi2D.hpp
+1
-2
impls/square-cell/vn-neighbours/1-levels/opencl/Grid.hpp
impls/square-cell/vn-neighbours/1-levels/opencl/Grid.hpp
+9
-0
impls/square-cell/vn-neighbours/1-levels/simple/Grid.hpp
impls/square-cell/vn-neighbours/1-levels/simple/Grid.hpp
+9
-0
No files found.
impls/hexagonal-cell/1-levels/simple/Grid.hpp
View file @
cc06dea1
...
...
@@ -118,6 +118,10 @@ namespace CA {
Real
distance
()
const
;
//! Returns the area of a cell.
Real
area
()
const
;
//! Return the x coordinate of the bottom-left corner.
Real
xCoo
()
const
;
...
...
@@ -356,6 +360,11 @@ namespace CA {
return
_cagrid
.
distance
;
}
inline
Real
Grid
::
area
()
const
{
return
_cagrid
.
area
;
}
inline
Real
Grid
::
xCoo
()
const
{
return
_cagrid
.
x_coo
;
...
...
impls/hexagonal-cell/1-levels/simple/caapi2D.hpp
View file @
cc06dea1
...
...
@@ -141,8 +141,7 @@ struct _caGrid
//! The distance between the centroid of the main cell (number 0)
//! and the centroid of the given cell in the vertical and
//! horizontal plane.
//! and the centroid of an adjacent cell.
_caReal
distance
;
//! The x coordinate of the bottom-left corner
...
...
impls/square-cell/vn-neighbours/1-levels/opencl/Grid.hpp
View file @
cc06dea1
...
...
@@ -141,6 +141,10 @@ namespace CA {
Real
length
()
const
;
//! Returns the area of a cell.
Real
area
()
const
;
//! Return the x coordinate of the bottom-left corner.
Real
xCoo
()
const
;
...
...
@@ -749,6 +753,11 @@ namespace CA {
return
_cagrid
.
length
;
}
inline
Real
Grid
::
area
()
const
{
return
_cagrid
.
area
;
}
inline
Real
Grid
::
xCoo
()
const
{
...
...
impls/square-cell/vn-neighbours/1-levels/simple/Grid.hpp
View file @
cc06dea1
...
...
@@ -107,6 +107,10 @@ namespace CA {
Real
length
()
const
;
//! Returns the area of a cell.
Real
area
()
const
;
//! Return the x coordinate of the bottom-left corner.
Real
xCoo
()
const
;
...
...
@@ -364,6 +368,11 @@ namespace CA {
return
_cagrid
.
length
;
}
inline
Real
Grid
::
area
()
const
{
return
_cagrid
.
area
;
}
inline
Real
Grid
::
xCoo
()
const
{
...
...
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