add handling of (expression)[indexing] in addMissingIndexingRecurse#929
Merged
Conversation
…dMissingIndexingRecurse
of expressions in BUGS code, for now
Contributor
Author
|
One further note here - because of checking I added, this PR errors out for missing indexes of expressions, e.g., However, if I take that check out, compilation goes through and calculations are fine. So we may well not want to check for missing indexes, unless we think there are cases where missing indexing will cause problems. Need input from @perrydv on what happens in terms of translation to Eigen code when indexes are missing. |
add recursion into the indexing elements
Contributor
Author
Waiting on Travis. |
monkey with tests for indexing given flightiness in message vs. output vs silent
Contributor
Author
|
Apparently here's the use case for needing to check $ (see line 1284 of test-nimbleLIst.R) Adding this back in and rerunning tests. |
specification for missing indexes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FRO-DNM
This looks for cases like
(x[1:2]%*%y[1:2])[1,1]based on(and[and if found, checks no missing indices and then runsaddMissingIndexingRecurseon the parenthesized expression being indexed.Before finalizing this I would also like to resolve the question raised in NCT issue 141 regarding whether the stanza beginning line 562 of BUGS_modelDef.R that checks for
$is needed.Will need to add testing, including testing for correct trapping of missing indexing and vector version of this situation, namely something like
(y[1:2]*x[1:2])[2]