Skip to content

Added a new insertionOptions: 'noInvalidPoints'#8

Merged
jlblancoc merged 5 commits into
MRPT:masterfrom
mlopezantequera:master
Jan 17, 2014
Merged

Added a new insertionOptions: 'noInvalidPoints'#8
jlblancoc merged 5 commits into
MRPT:masterfrom
mlopezantequera:master

Conversation

@mlopezantequera

Copy link
Copy Markdown
Contributor

Added a new insertionOptions 'noInvalidPoints' so that every point is kept when inserting a point map from a CObservation into a CColouredPointsMap or into a CSimplePointsMap.

I implemented this so that the cloud was still ordered after insertion from the CObservation.

I'm not sure of what to do about implementing this also into CWeightedPointsMap (or if it makes sense to do so), since it's readFromStream method doesn't have any version check like CSimplePointsMap & CColouredPointsMap.

@jlblancoc

Copy link
Copy Markdown
Member

Thanks, seems a reasonable feature.
I only have doubts with the name of the new parameter: the "no"+"invalid" seems confusing... what do you think about renaming it to "insertInvalidPoints" or alike? Please, add a new commit if you agree and I'll proceed with the merge.

On the weighted points map, it can be done, but don't worry. After your merge I think it's about time to give "insertionOptions" its own read/write to stream method to make things more maintainable; I'll do it.

@mlopezantequera

Copy link
Copy Markdown
Contributor Author

It was a terrible name indeed. fixed.

jlblancoc added a commit that referenced this pull request Jan 17, 2014
Added a new insertionOptions: 'noInvalidPoints'
@jlblancoc jlblancoc merged commit 09a4b82 into MRPT:master Jan 17, 2014
jlblancoc pushed a commit that referenced this pull request Aug 27, 2016
Use matplotlib for comparing translation errors
jlblancoc added a commit that referenced this pull request May 28, 2026
…scalar-root fix, #9 dead code, #11 thread-safety docs, #13 Python mapping protocol

- textToScalar() now promotes booleans, integers, and doubles at parse time
  so scalarType() returns the correct type after loading from file/string
- double emitter appends ".0" when the formatted value has no decimal point,
  preserving round-trip fidelity for values like 1.0
- operator[](int) added as alias for operator()(int) on sequence nodes
- erase(string) / erase(int) added for maps and sequences
- implOpAssign() allows scalar assignment to non-proxy (root) yaml documents
- Removed two #if 0 dead code blocks from yaml.cpp
- Doxygen \note added to yaml class documenting the thread-safety policy
- Python bindings: __getitem__/__setitem__/__delitem__ handle both str and int
  keys; append(), values(), items(), to_dict(), to_list(), from_dict(),
  from_list() added; thread-safety note in docstring; all deep-copy children
  to avoid dangling proxy references
- Test expectations updated to reflect double 1.0 now printing as "1.0"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

2 participants