/// <summary> /// Creates an <c>IntersectionMatrix</c> with the same elements as /// <c>other</c>. /// </summary> /// <param name="other">An <c>IntersectionMatrix</c> to copy.</param> public IntersectionMatrix(IntersectionMatrix other) : this() { _matrix[(int)LocationType.Interior, (int)LocationType.Interior] = other._matrix[(int)LocationType.Interior, (int)LocationType.Interior]; _matrix[(int)LocationType.Interior, (int)LocationType.Boundary] = other._matrix[(int)LocationType.Interior, (int)LocationType.Boundary]; _matrix[(int)LocationType.Interior, (int)LocationType.Exterior] = other._matrix[(int)LocationType.Interior, (int)LocationType.Exterior]; _matrix[(int)LocationType.Boundary, (int)LocationType.Interior] = other._matrix[(int)LocationType.Boundary, (int)LocationType.Interior]; _matrix[(int)LocationType.Boundary, (int)LocationType.Boundary] = other._matrix[(int)LocationType.Boundary, (int)LocationType.Boundary]; _matrix[(int)LocationType.Boundary, (int)LocationType.Exterior] = other._matrix[(int)LocationType.Boundary, (int)LocationType.Exterior]; _matrix[(int)LocationType.Exterior, (int)LocationType.Interior] = other._matrix[(int)LocationType.Exterior, (int)LocationType.Interior]; _matrix[(int)LocationType.Exterior, (int)LocationType.Boundary] = other._matrix[(int)LocationType.Exterior, (int)LocationType.Boundary]; _matrix[(int)LocationType.Exterior, (int)LocationType.Exterior] = other._matrix[(int)LocationType.Exterior, (int)LocationType.Exterior]; }
/// <summary> /// Returns true if each of the actual dimension symbols satisfies the /// corresponding required dimension symbol. /// </summary> /// <param name="actualDimensionSymbols"> /// Nine dimension symbols to validate. /// Possible values are <c>T, F, *, 0, 1, 2</c>. /// </param> /// <param name="requiredDimensionSymbols"> /// Nine dimension symbols to validate /// against. Possible values are <c>T, F, *, 0, 1, 2</c>. /// </param> /// <returns> /// True if each of the required dimension /// symbols encompass the corresponding actual dimension symbol. /// </returns> public static bool Matches(string actualDimensionSymbols, string requiredDimensionSymbols) { IntersectionMatrix m = new IntersectionMatrix(actualDimensionSymbols); return m.Matches(requiredDimensionSymbols); }
/// <summary> /// Returns true if each of the actual dimension symbols satisfies the /// corresponding required dimension symbol. /// </summary> /// <param name="actualDimensionSymbols"> /// Nine dimension symbols to validate. /// Possible values are <c>T, F, *, 0, 1, 2</c>. /// </param> /// <param name="requiredDimensionSymbols"> /// Nine dimension symbols to validate /// against. Possible values are <c>T, F, *, 0, 1, 2</c>. /// </param> /// <returns> /// True if each of the required dimension /// symbols encompass the corresponding actual dimension symbol. /// </returns> public static bool Matches(string actualDimensionSymbols, string requiredDimensionSymbols) { IntersectionMatrix m = new IntersectionMatrix(actualDimensionSymbols); return(m.Matches(requiredDimensionSymbols)); }