示例#1
0
 /// <summary>
 /// Initialize a fresh, new obejct with zeros
 /// </summary>
 /// <param name="cellArea"></param>
 /// <param name="vUnit"></param>
 public DoDStats(Area cellArea, UnitGroup sUnits)
 {
     StatsUnits    = sUnits;
     CellArea      = cellArea;
     ErosionRaw    = new GCDAreaVolume();
     DepositionRaw = new GCDAreaVolume();
     ErosionThr    = new GCDAreaVolume();
     DepositionThr = new GCDAreaVolume();
     ErosionErr    = new GCDAreaVolume();
     DepositionErr = new GCDAreaVolume();
 }
示例#2
0
 /// <summary>
 /// Copy Constructor (NOTE: Creates an EMPTY COPY!!!!)
 /// </summary>
 /// <param name="oldStats"></param>
 public DoDStats(DoDStats oldStats)
 {
     StatsUnits    = oldStats.StatsUnits;
     CellArea      = oldStats.CellArea;
     ErosionRaw    = new GCDAreaVolume();
     DepositionRaw = new GCDAreaVolume();
     ErosionThr    = new GCDAreaVolume();
     DepositionThr = new GCDAreaVolume();
     ErosionErr    = new GCDAreaVolume();
     DepositionErr = new GCDAreaVolume();
 }
示例#3
0
        /// <summary>
        /// Create this object from nothing more than numbers and units. There are a lot of each.
        /// </summary>
        /// <param name="AreaErosion_Raw"></param>
        /// <param name="AreaDeposition_Raw"></param>
        /// <param name="AreaErosion_Thresholded"></param>
        /// <param name="AreaDeposition_Thresholded"></param>
        /// <param name="VolumeErosion_Raw"></param>
        /// <param name="VolumeDeposition_Raw"></param>
        /// <param name="VolumeErosion_Thresholded"></param>
        /// <param name="VolumeDeposition_Thresholded"></param>
        /// <param name="VolumeErosion_Error"></param>
        /// <param name="VolumeDeposition_Error"></param>
        /// <param name="cellArea"></param>
        /// <param name="sUnits"></param>
        public DoDStats(Area AreaErosion_Raw, Area AreaDeposition_Raw, Area AreaErosion_Thresholded, Area AreaDeposition_Thresholded,
                        Volume VolumeErosion_Raw, Volume VolumeDeposition_Raw, Volume VolumeErosion_Thresholded, Volume VolumeDeposition_Thresholded,
                        Volume VolumeErosion_Error, Volume VolumeDeposition_Error,
                        Area cellArea, UnitGroup sUnits)
        {
            StatsUnits = sUnits;
            CellArea   = cellArea;

            ErosionRaw    = new GCDAreaVolume(AreaErosion_Raw, VolumeErosion_Raw, cellArea, sUnits);
            DepositionRaw = new GCDAreaVolume(AreaDeposition_Raw, VolumeDeposition_Raw, cellArea, sUnits);

            ErosionThr    = new GCDAreaVolume(AreaErosion_Thresholded, VolumeErosion_Thresholded, cellArea, sUnits);
            DepositionThr = new GCDAreaVolume(AreaDeposition_Thresholded, VolumeDeposition_Thresholded, cellArea, sUnits);

            // Note that we don't store Area for the error so let's just set it to 0
            ErosionErr    = new GCDAreaVolume(Area.FromSquareMeters(0), VolumeErosion_Error, cellArea, sUnits);
            DepositionErr = new GCDAreaVolume(Area.FromSquareMeters(0), VolumeDeposition_Error, cellArea, sUnits);
        }
示例#4
0
 /// <summary>
 /// Mainly Used for Testing
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(GCDAreaVolume other)
 {
     return(Count.Equals(other.Count) && _sum.Equals(other._sum));
 }