From e2b1df71124ce7912fcffb9614a73114cae0ff6b Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sun, 22 Nov 2015 20:44:52 +0100 Subject: [PATCH] Statistics: doc remarks on limited scope of DataContracts --- src/Numerics/Statistics/DescriptiveStatistics.cs | 8 +++++++- src/Numerics/Statistics/Histogram.cs | 6 ++++++ src/Numerics/Statistics/RunningStatistics.cs | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Numerics/Statistics/DescriptiveStatistics.cs b/src/Numerics/Statistics/DescriptiveStatistics.cs index 3c0d7029..4c847c20 100644 --- a/src/Numerics/Statistics/DescriptiveStatistics.cs +++ b/src/Numerics/Statistics/DescriptiveStatistics.cs @@ -39,8 +39,14 @@ namespace MathNet.Numerics.Statistics /// NIST standard of accuracy for mean, variance, and standard deviation /// (the only statistics they provide exact values for) and exceeds them /// in increased accuracy mode. + /// Recommendation: consider to use RunningStatistics instead. /// - /// Consider to use RunningStatistics instead. + /// + /// This type declares a DataContract for out of the box ephemeral serialization + /// with engines like DataContractSerializer, Protocol Buffers and FsPickler, + /// but does not guarantee any compatibility between versions. + /// It is not recommended to rely on this mechanism for durable persistance. + /// [DataContract(Namespace = "urn:MathNet/Numerics")] public class DescriptiveStatistics { diff --git a/src/Numerics/Statistics/Histogram.cs b/src/Numerics/Statistics/Histogram.cs index 9587cee4..8e9b2610 100644 --- a/src/Numerics/Statistics/Histogram.cs +++ b/src/Numerics/Statistics/Histogram.cs @@ -40,6 +40,12 @@ namespace MathNet.Numerics.Statistics /// A consists of a series of s, /// each representing a region limited by a lower bound (exclusive) and an upper bound (inclusive). /// + /// + /// This type declares a DataContract for out of the box ephemeral serialization + /// with engines like DataContractSerializer, Protocol Buffers and FsPickler, + /// but does not guarantee any compatibility between versions. + /// It is not recommended to rely on this mechanism for durable persistance. + /// [Serializable] [DataContract(Namespace = "urn:MathNet/Numerics")] public class Bucket : diff --git a/src/Numerics/Statistics/RunningStatistics.cs b/src/Numerics/Statistics/RunningStatistics.cs index 44387c8c..37152f1e 100644 --- a/src/Numerics/Statistics/RunningStatistics.cs +++ b/src/Numerics/Statistics/RunningStatistics.cs @@ -41,6 +41,12 @@ namespace MathNet.Numerics.Statistics /// Running statistics accumulator, allows updating by adding values /// or by combining two accumulators. /// + /// + /// This type declares a DataContract for out of the box ephemeral serialization + /// with engines like DataContractSerializer, Protocol Buffers and FsPickler, + /// but does not guarantee any compatibility between versions. + /// It is not recommended to rely on this mechanism for durable persistance. + /// [DataContract(Namespace = "urn:MathNet/Numerics")] public class RunningStatistics {