/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if the types where equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The <see cref="IZincFundamentalType"/> to match this type against.</param> public bool GenericEquals(IMiniZincType other) { var zst = other as MiniZincSetType; if (zst != null) { return(this.elementType.GenericEquals(zst.elementType)); } return(false); }
/// <summary> /// Initializes a new instance of the <see cref="ZincOxide.MiniZinc.Types.Fundamental.ZincFundamentalTypeInst"/> class with a specified /// instantiation and fundamental type. /// </summary> /// <param name="instantiation">The instantiation of the type-instance.</param> /// <param name="type">The type of the type-instance.</param> /// <exception cref="ArgumentNullException">If <paramref name="type"/> is not effective.</exception> public MiniZincTypeInst(ZincVarPar instantiation, IMiniZincType type) { this.Instantiation = instantiation; this.Type = type; }
public bool GenericEquals(IMiniZincType other) { throw new NotImplementedException (); }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if both types are equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The zinc type to compare with.</param> public bool GenericEquals(IMiniZincType other) { return((other as MiniZincAnnotationType) != null); }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if both types are equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The zinc type to compare with.</param> public bool GenericEquals(IMiniZincType other) { MiniZincArrayType zat = other as MiniZincArrayType; return zat != null && this.IndexType.GenericEquals (zat.IndexType) && this.ElementType.GenericEquals (zat.ElementType); }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if the types where equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The <see cref="IZincFundamentalType"/> to match this type against.</param> public bool GenericEquals(IMiniZincType other) { var zst = other as MiniZincSetType; if (zst != null) { return this.elementType.GenericEquals (zst.elementType); } return false; }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if the types where equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The <see cref="IZincFundamentalType"/> to match this type against.</param> public bool GenericEquals(IMiniZincType other) { MiniZincTupleType ztt = other as MiniZincTupleType; return ztt != null && EnumerableUtils.All (this.itemTypes, ztt.ItemTypes, (x, y) => x.GenericEquals (y)); }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if the types where equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The <see cref="IZincFundamentalType"/> to match this type against.</param> public bool GenericEquals(IMiniZincType other) { MiniZincTupleType ztt = other as MiniZincTupleType; return(ztt != null && EnumerableUtils.All(this.itemTypes, ztt.ItemTypes, (x, y) => x.GenericEquals(y))); }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if both types are equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The zinc type to compare with.</param> public bool GenericEquals(IMiniZincType other) { return (other as MiniZincAnnotationType) != null; }
/// <summary> /// Initializes a new instance of the <see cref="ZincOxide.MiniZinc.Types.Fundamental.ZincFundamentalTypeInst"/> class with a specified /// instantiation and fundamental type. /// </summary> /// <param name="instantiation">The instantiation of the type-instance.</param> /// <param name="type">The type of the type-instance.</param> /// <exception cref="ArgumentNullException">If <paramref name="type"/> is not effective.</exception> public MiniZincTypeInst(ZincVarPar instantiation, IMiniZincType type) { this.Instantiation = instantiation; this.Type = type; }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if both types are equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The zinc type to compare with.</param> public bool GenericEquals(IMiniZincType other) { MiniZincTypeInstanceVariable mztiv = other as MiniZincTypeInstanceVariable; return (mztiv != null); }
public bool GenericEquals(IMiniZincType other) { throw new NotImplementedException(); }
/// <summary> /// Initializes a new instance of the <see cref="ZincOxide.MiniZinc.Types.Fundamental.ZincFundamentalTypeInst"/> class with /// a specified fundamental type. /// </summary> /// <param name="type">The type of the type-instance.</param> /// <exception cref="ArgumentNullException">If <paramref name="type"/> is not effective.</exception> public MiniZincTypeInst(IMiniZincType type) : this(DefaultInstantiation, type) { }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if both types are equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The zinc type to compare with.</param> public bool GenericEquals(IMiniZincType other) { MiniZincScalarTypeEntry mzste = other as MiniZincScalarTypeEntry; return mzste != null && this.ScalarType == mzste.ScalarType; }
/// <summary> /// Initializes a new instance of the <see cref="ZincOxide.MiniZinc.Types.Fundamental.ZincFundamentalTypeInst"/> class with /// a specified fundamental type. /// </summary> /// <param name="type">The type of the type-instance.</param> /// <exception cref="ArgumentNullException">If <paramref name="type"/> is not effective.</exception> public MiniZincTypeInst(IMiniZincType type) : this(DefaultInstantiation, type) { }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if both types are equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The zinc type to compare with.</param> public bool GenericEquals(IMiniZincType other) { MiniZincScalarTypeEntry mzste = other as MiniZincScalarTypeEntry; return(mzste != null && this.ScalarType == mzste.ScalarType); }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if both types are equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The zinc type to compare with.</param> public bool GenericEquals(IMiniZincType other) { MiniZincArrayType zat = other as MiniZincArrayType; return(zat != null && this.IndexType.GenericEquals(zat.IndexType) && this.ElementType.GenericEquals(zat.ElementType)); }
/// <summary> /// Checks if this zinc type is equal to the given zinc type. /// </summary> /// <returns><see langword="true"/>, if both types are equal, <see langword="false"/> otherwise.</returns> /// <param name="other">The zinc type to compare with.</param> public bool GenericEquals(IMiniZincType other) { MiniZincTypeInstanceVariable mztiv = other as MiniZincTypeInstanceVariable; return(mztiv != null); }