R/Class-GridTopology.R
raw| 1 | setClass("GridTopology", |
| 2 | slots = c(cellcentre.offset = "numeric", |
| 3 | cellsize = "numeric", |
| 4 | cells.dim = "integer"), |
| 5 | validity = function(object) { |
| 6 | n = length(na.omit([email protected])) |
| 7 | if (length(na.omit(object@cellsize)) != n) |
| 8 | return("cellsize has incorrect dimension") |
| 9 | if (sum([email protected] > 0) != n) |
| 10 | return("cells.dim has incorrect dimension") |
| 11 | return(TRUE) |
| 12 | } |
| 13 | ) |