documentation update
.NET Test / .NET tests (push) Successful in 1m58s
.NET Publish / publish (push) Successful in 58s

This commit is contained in:
2026-07-10 22:16:20 +04:00
parent 8e961352d2
commit e37e9b65c3
9 changed files with 137 additions and 11 deletions
+5
View File
@@ -3,6 +3,11 @@ using System.Runtime.InteropServices;
namespace Just.Core.Collections;
/// <summary>
/// A 2D grid with lazy min/max caching, cloning, and binary stream serialization.
/// Requires <typeparamref name="T"/> to support comparison and equality operators.
/// </summary>
/// <typeparam name="T">The element type; must implement <c>IComparisonOperators&lt;T, T, bool&gt;</c> and <c>IEqualityOperators&lt;T, T, bool&gt;</c>.</typeparam>
public class DataMap<T> : Map<T>, IDataMap<T>, ICloneable
where T : IComparisonOperators<T, T, bool>, IEqualityOperators<T, T, bool>
{
+2
View File
@@ -2,6 +2,8 @@ using System.Numerics;
namespace Just.Core.Collections;
/// <summary>Read-only interface for a 2D grid with min/max tracking and cloning.</summary>
/// <typeparam name="T">The element type; must support comparison and equality operators.</typeparam>
public interface IDataMap<T> : IMap<T>, ICloneable
where T : IComparisonOperators<T, T, bool>, IEqualityOperators<T, T, bool>
{
+2
View File
@@ -1,5 +1,7 @@
namespace Just.Core.Collections;
/// <summary>Read-only interface for a 2D grid with coordinate-based access and enumeration.</summary>
/// <typeparam name="T">The type of elements in the map.</typeparam>
public interface IMap<T> : IReadOnlyCollection<MapPoint<T>>
{
int Width { get; }
+5
View File
@@ -2,6 +2,11 @@ using System.Collections;
namespace Just.Core.Collections;
/// <summary>
/// A 2D grid container providing indexer access, enumeration as <see cref="MapPoint{T}"/> values,
/// and conversion to a 2D array. Coordinates are clamped to valid ranges.
/// </summary>
/// <typeparam name="T">The type of elements in the map.</typeparam>
public class Map<T> : IMap<T>
{
internal readonly T[] _values;
+2
View File
@@ -1,5 +1,7 @@
namespace Just.Core.Collections;
/// <summary>A value and its coordinates within a <see cref="IMap{T}"/>.</summary>
/// <typeparam name="T">The type of the map element.</typeparam>
public readonly struct MapPoint<T>(T value, int x, int y, IMap<T> map)
{
public readonly T Value = value;