diff --git a/src/Numerics/Statistics/Histogram.cs b/src/Numerics/Statistics/Histogram.cs index b86b44b2..9587cee4 100644 --- a/src/Numerics/Statistics/Histogram.cs +++ b/src/Numerics/Statistics/Histogram.cs @@ -28,18 +28,20 @@ // OTHER DEALINGS IN THE SOFTWARE. // +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Text; +using MathNet.Numerics.Properties; + namespace MathNet.Numerics.Statistics { - using System; - using System.Collections.Generic; - using System.Text; - using Properties; - /// /// A consists of a series of s, /// each representing a region limited by a lower bound (exclusive) and an upper bound (inclusive). /// [Serializable] + [DataContract(Namespace = "urn:MathNet/Numerics")] public class Bucket : #if PORTABLE IComparable @@ -71,11 +73,13 @@ namespace MathNet.Numerics.Statistics /// /// Lower Bound of the Bucket. /// + [DataMember(Order = 1)] public double LowerBound { get; set; } /// /// Upper Bound of the Bucket. /// + [DataMember(Order = 2)] public double UpperBound { get; set; } /// @@ -84,6 +88,7 @@ namespace MathNet.Numerics.Statistics /// /// Value may be NaN if this was constructed as a argument. /// + [DataMember(Order = 3)] public double Count { get; set; } /// @@ -245,16 +250,19 @@ namespace MathNet.Numerics.Statistics /// A class which computes histograms of data. /// [Serializable] + [DataContract(Namespace = "urn:MathNet/Numerics")] public class Histogram { /// /// Contains all the Buckets of the Histogram. /// + [DataMember(Order = 1)] private readonly List _buckets; /// /// Indicates whether the elements of buckets are currently sorted. /// + [DataMember(Order = 2)] private bool _areBucketsSorted; ///