Closed jimbraun closed 8 years ago
Some test changes in branch 0074-parent-sibling-comparison. Needs some thought. This needs to work to properly analyze 2D data. The following is a real-world example of a (CD) relationship we'd want to support:
xcdf histogram "128, channel.waveformData, channelID == 2"
where we have an array of channels, so channelID is a 1D vector, and channel.waveformData is 2D.
Imagine an XCDF file with the following field structure
A-->B-->C -->D E
where root field A is the parent of B and D and B is the parent of 2D field C, and E is an unrelated root field. We can compare/histogram all field combinations except (CB) and (CD). Generally (CB) would be unusual since B only contains a number of entries, but (CD) would not be uncommon, since node D may contain a weight or something else to cut/draw against. In such a case, it would be proper to only draw items in C that correlate with the proper entry in B/D. Since we can get at the parent field in XCDFField/Node, it should be possible to implement this e.g.:
unsigned GetParentIndex(unsigned index)
that uses std::find on the parent iterator. Or better yet, a routine that does this, since this interface should be invisible to the user.
This is related to #69.