/// <summary> /// Determines whether the specified <see cref="ChannelStatistics"/> is equal to the current <see cref="ChannelStatistics"/>. /// </summary> /// <param name="other">The channel statistics to compare this <see cref="ChannelStatistics"/> with.</param> /// <returns>True when the specified <see cref="ChannelStatistics"/> is equal to the current <see cref="ChannelStatistics"/>.</returns> public bool Equals(ChannelStatistics other) { if (ReferenceEquals(other, null)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (Depth.Equals(other.Depth) && Entropy.Equals(other.Entropy) && Kurtosis.Equals(other.Kurtosis) && Maximum.Equals(other.Maximum) && Mean.Equals(other.Mean) && Minimum.Equals(other.Minimum) && Skewness.Equals(other.Skewness) && StandardDeviation.Equals(other.StandardDeviation) && Sum.Equals(other.Sum) && SumCubed.Equals(other.SumCubed) && SumFourthPower.Equals(other.SumFourthPower) && SumSquared.Equals(other.SumSquared) && Variance.Equals(other.Variance)); }
/// <summary> /// Create a octree of type T. /// </summary> /// <param name="Voxel1">A voxel of type T.</param> /// <param name="Voxel2">A voxel of type T.</param> /// <param name="MaxNumberOfEmbeddedVoxels">The maximum number of embedded voxels before eight subtrees will be created.</param> public Octree(Voxel <T> Voxel1, Voxel <T> Voxel2, UInt32 MaxNumberOfEmbeddedVoxels = 256) : base(Voxel1, Voxel2) { if (Voxel1.Equals(Voxel2)) { throw new OT_ZeroDimensionException <T>(this, "Width == 0 && Height == 0 && Depth == 0!"); } if (Width.Equals(default(T))) { throw new OT_ZeroDimensionException <T>(this, "Width == 0!"); } if (Height.Equals(default(T))) { throw new OT_ZeroDimensionException <T>(this, "Height == 0!"); } if (Depth.Equals(default(T))) { throw new OT_ZeroDimensionException <T>(this, "Depth == 0!"); } this.MaxNumberOfEmbeddedVoxels = MaxNumberOfEmbeddedVoxels; this.EmbeddedVoxels = new HashedSet <IVoxel <T> >(); }
public override bool Equals(Path?other) { if (ReferenceEquals(other, null)) { return(false); } if (other is NamePathSegment name && Depth.Equals(name.Depth) && Name.Equals(name.Name)) { if (Parent is null) { return(name.Parent is null); } if (name.Parent is null) { return(false); } return(Parent.Equals(name.Parent)); } return(false); }
public bool allDistanceNotZero() { if (Height.Equals(0) || Width.Equals(0) || Depth.Equals(0)) { return(false); } else { return(true); } }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <returns> /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false. /// </returns> /// <param name="other">An object to compare with this object. /// </param> public bool Equals(SizeIndex other) { bool equals = true; equals = equals && (Depth != default(int) & other.Depth != default(int)) ? Depth.Equals(other.Depth) : Depth == default(int) & other.Depth == default(int); equals = equals && (CountsAndSizes != default(System.Collections.Generic.Dictionary <Folder, CountAndSize>) & other.CountsAndSizes != default(System.Collections.Generic.Dictionary <Folder, CountAndSize>)) ? CountsAndSizes.Equals(other.CountsAndSizes) : CountsAndSizes == default(System.Collections.Generic.Dictionary <Folder, CountAndSize>) & other.CountsAndSizes == default(System.Collections.Generic.Dictionary <Folder, CountAndSize>); return(equals); }
public override bool Equals(Path?other) { if (ReferenceEquals(other, null)) { return(false); } if (other is IndexerPathSegment indexer && Depth.Equals(indexer.Depth) && Index.Equals(indexer.Index) && Parent.Equals(indexer.Parent)) { return(true); } return(false); }
public bool Equals(CsvLogEntry other) { //Check whether the compared object is null. if (ReferenceEquals(other, null)) { return(false); } //Check whether the compared object references the same data. if (ReferenceEquals(this, other)) { return(true); } //Check whether the CvsLogEntry' properties are equal. return(Depth.Equals(other.Depth) && Point.Equals(other.Point)); }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <returns> /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false. /// </returns> /// <param name="other">An object to compare with this object. /// </param> public bool Equals(FolderInfo other) { bool equals = true; equals = equals && (Depth != default(int) & other.Depth != default(int)) ? Depth.Equals(other.Depth) : Depth == default(int) & other.Depth == default(int); equals = equals && (Count != default(long) & other.Count != default(long)) ? Count.Equals(other.Count) : Count == default(long) & other.Count == default(long); equals = equals && (Size != default(long) & other.Size != default(long)) ? Size.Equals(other.Size) : Size == default(long) & other.Size == default(long); return(equals); }
/// <summary> /// Create a octree of type T. /// </summary> /// <param name="Left">The left-coordinate.</param> /// <param name="Top">The top-coordinate.</param> /// <param name="Front">The front-coordinate.</param> /// <param name="Right">The right-coordinate.</param> /// <param name="Bottom">The bottom-coordinate.</param> /// <param name="Behind">The behind-coordinate.</param> /// <param name="MaxNumberOfEmbeddedVoxels">The maximum number of embedded voxels before eight subtrees will be created.</param> public Octree(T Left, T Top, T Front, T Right, T Bottom, T Behind, UInt32 MaxNumberOfEmbeddedVoxels = 256) : base(Left, Top, Front, Right, Bottom, Behind) { if (Width.Equals(default(T))) { throw new OT_ZeroDimensionException <T>(this, "Width == 0!"); } if (Height.Equals(default(T))) { throw new OT_ZeroDimensionException <T>(this, "Height == 0!"); } if (Depth.Equals(default(T))) { throw new OT_ZeroDimensionException <T>(this, "Depth == 0!"); } this.MaxNumberOfEmbeddedVoxels = MaxNumberOfEmbeddedVoxels; this.EmbeddedVoxels = new HashedSet <IVoxel <T> >(); }
public bool Equals(BoundingBox other) => Position.Equals(other.Position) && Width.Equals(other.Width) && Height.Equals(other.Height) && Depth.Equals(other.Depth);