]> pintos-os.org Git - pspp/commitdiff
Improve manual
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 19 Sep 2026 23:08:25 +0000 (16:08 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 19 Sep 2026 23:08:25 +0000 (16:08 -0700)
rust/doc/src/language/basics/missing-values.md
rust/pspp/src/spv/read/graph.rs
rust/pspp/src/spv/read/graph/var_set.rs

index a63e0a45cf17551b3c02bb7ab13c659b489906b8..cca3f3d35c00390553fa5e6a4c877699beb30041 100644 (file)
@@ -9,11 +9,13 @@ values.  Details of missing value exclusion depend on the procedure and
 can often be controlled by the user; refer to descriptions of individual
 procedures for details.
 
-   The system-missing value exists only for numeric variables.  String
+The system-missing value exists only for numeric variables.  String
 variables always have a defined value, even if it is only a string of
 spaces.
 
-   Variables, whether numeric or string, can have designated
-"user-missing values".  Every user-missing value is an actual value for
-that variable.  However, most of the time user-missing values are
-treated in the same way as the system-missing value.
+Variables, whether numeric or string, can have designated
+"user-missing values".  Every user-missing value is an actual value
+for that variable.  Any variables can have up to three user-missing
+values; numeric variables can also have a range of missing values.
+Most of the time, user-missing values are treated in the same way as
+the system-missing value.
index b6b98a4bafd843fe935f7d624f651b82472de436..7efed85ba8d1991360eec3272374f0d71f6dd6e9 100644 (file)
@@ -2717,6 +2717,7 @@ struct RawElement {
     _hinge_style: Option<String>,
     _outlier_style: Option<String>,
     _extreme_style: Option<String>,
+    _position_modifier: PositionModifier,
     style: Option<String>,
     statistics: Vec<Statistic>,
 
@@ -2825,6 +2826,9 @@ impl<'de> Deserialize<'de> for RawElement {
             #[serde(rename = "$value")]
             statistics: Vec<Statistic>,
 
+            #[serde(rename = "@positionModifier")]
+            position_modifier: PositionModifier,
+
             /// `position` is just a generic way to say x, y, z
             position: Vec<Coordinate>,
             x: Option<Coordinate>,
@@ -2855,6 +2859,7 @@ impl<'de> Deserialize<'de> for RawElement {
             _hinge_style: raw.hinge_style,
             _outlier_style: raw.outlier_style,
             _extreme_style: raw.extreme_style,
+            _position_modifier: raw.position_modifier,
             style: raw.style,
             statistics: raw.statistics,
             operator,
@@ -2866,6 +2871,25 @@ impl<'de> Deserialize<'de> for RawElement {
     }
 }
 
+#[derive(Copy, Clone, Deserialize, Debug, Default, PartialEq, Eq)]
+#[serde(rename_all = "camelCase")]
+enum PositionModifier {
+    #[default]
+    None,
+    Center,
+    CenterStacked,
+    Stack,
+    StackInterpolating,
+    SetMissingsToZero,
+    MinusIntersection,
+    Dodge,
+    Pile,
+    JitterJointUniform,
+    JitterConditionalUniform,
+    JitterJointNormal,
+    JitterConditionalNormal,
+}
+
 #[derive(Deserialize, Debug)]
 #[serde(rename_all = "camelCase")]
 struct ColorAesthetic {
index 8348885e38f357978ec10ff931a15479a2c371b3..1e520bea2a747c4edbc5b28782d13c7b7f0ca926 100644 (file)
@@ -9,7 +9,7 @@ use std::{
 use either::Either;
 use itertools::Itertools as _;
 
-use crate::spv::read::graph::Series;
+use crate::spv::read::graph::{Series, format::Formatter};
 
 /// Operator precedence:
 ///
@@ -508,6 +508,22 @@ impl VarSet {
 
 pub struct NestError;
 
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+enum DimensionKind {
+    Coordinate,
+    Facet,
+    Statistic,
+    Weight,
+    Layer,
+}
+
+struct DimensionInfo {
+    name: String,
+    kind: DimensionKind,
+    format: Formatter,
+    is_categorical: bool,
+}
+
 #[cfg(test)]
 mod tests {
     use std::str::FromStr;