Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with padding #58

Open
roughhawkbit opened this issue Jan 13, 2015 · 2 comments
Open

Dealing with padding #58

roughhawkbit opened this issue Jan 13, 2015 · 2 comments

Comments

@roughhawkbit
Copy link
Collaborator

Potential inconsistency between SpatialGrid.isValid(DiscreteVector dC) (1) and SpatialGrid.isValidOrPadded(int i, int j, int k) (2). The comment for (1) claims that it excludes padding, whereas (2) is commented as including padding. (1) allows values for 0 <= i < nI, 0 <= j < nJ, 0 <= k < nK and (2) allows values for 0 <= i <= nI, 0 <= j <= nJ, 0 <= k <= nK. So, while there is a difference in how the two deal with nI/nJ/nK values, they deal with 0 values identically.

A third, unused, method SpatialGrid.isValidOrPadded(DiscreteVector dC) allowed values for -1 <= i < nI, -1 <= j < nJ, -1 <= k < nK. This will be removed.

@roughhawkbit
Copy link
Collaborator Author

Also worth noting that DiscreteVector(ContinuousVector cV, Double res) uses Math.ceil of cV.x/res, etc, whereas SpatialGrid.getDiscreteCoordinates(ContinuousVector cC) uses Math.floor.

@roughhawkbit
Copy link
Collaborator Author

SpatialGrid.getValueAt(DiscreteVector dc) returns grid value at (i+1, j+1, k+1) but SpatialGrid.getValueAt(int i, int j, int k) returns grid value at (i, j, k)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant