/// <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)Locations.Interior, (int)Locations.Interior] = other.matrix[(int)Locations.Interior, (int)Locations.Interior]; matrix[(int)Locations.Interior, (int)Locations.Boundary] = other.matrix[(int)Locations.Interior, (int)Locations.Boundary]; matrix[(int)Locations.Interior, (int)Locations.Exterior] = other.matrix[(int)Locations.Interior, (int)Locations.Exterior]; matrix[(int)Locations.Boundary, (int)Locations.Interior] = other.matrix[(int)Locations.Boundary, (int)Locations.Interior]; matrix[(int)Locations.Boundary, (int)Locations.Boundary] = other.matrix[(int)Locations.Boundary, (int)Locations.Boundary]; matrix[(int)Locations.Boundary, (int)Locations.Exterior] = other.matrix[(int)Locations.Boundary, (int)Locations.Exterior]; matrix[(int)Locations.Exterior, (int)Locations.Interior] = other.matrix[(int)Locations.Exterior, (int)Locations.Interior]; matrix[(int)Locations.Exterior, (int)Locations.Boundary] = other.matrix[(int)Locations.Exterior, (int)Locations.Boundary]; matrix[(int)Locations.Exterior, (int)Locations.Exterior] = other.matrix[(int)Locations.Exterior, (int)Locations.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)); }