# PTParameters and PTParameterMap

`PTParameters` is a pair of vectors, one each of [`PTParameterValue` and `PTParameterExpression`](ptparametervalue.md) - the parameter list attached to an instance, model, subcircuit definition, load, sweep, or analysis. `verify()` checks that no name appears twice across *both* vectors combined, so a parameter can't be "redefined" by switching it from a value to an expression either. The fluent `add()` overloads (see the [overview](parseroutput.md) for this pattern) accept a single value or expression, or merge in another whole `PTParameters`.

`PTParameterMap` is a different structure with a different job, spelled out in its own header comment. It holds *either* a borrowed pointer to an existing `PTParameterValue`/`PTParameterExpression` *or* owns a copy via `unique_ptr`, keyed by name in an `unordered_map` - which one, chosen per overload by whether the argument arrived as an lvalue (borrow; caller keeps ownership) or an rvalue (take ownership via `make_unique`). Two use sites are named directly in the comment: analysis objects collecting the parameter expressions relevant to them out of a `PTParameters`, and the control block interpreter tracking `option` settings - both want fast name-keyed lookup over a set of parameters that may be assembled from several sources, which a plain `PTParameters` (two vectors, no index) doesn't offer. The comment is explicit that ordinary API users should never touch it directly - it is internal plumbing, not part of the circuit-construction API proper.
