pub fn validate_constraints(
constraints: &[Constraint],
num_atoms: usize,
) -> Result<(), ConstraintError>Expand description
Validates constraint specifications for correctness.
Checks that:
- Atom indices are within valid range
- Target values are reasonable
- No duplicate constraints exist
§Arguments
constraints- List of constraints to validatenum_atoms- Total number of atoms in the system
§Returns
Ok(()) if all constraints are valid, Err(ConstraintError) otherwise.