/// <summary> /// Initializes a new instance of the <see cref="ZincSolveItem"/> class with a given <see cref="ZincSolveType"/>, /// an <see cref="IZincExp"/> that must be minimized/maximized and some <see cref="ZincAnnotations"/>. /// </summary> /// <param name="annotations">The annotations provided for the task.</param> /// <param name="solveType">The task that must be carried out.</param> /// <param name="expression">The <see cref="IZincExp"/> that must be minized/maximized.</param> public ZincSolveItem(ZincAnnotations annotations, ZincSolveType solveType, IZincExp expression) : base(annotations, expression) { this.SolveType = solveType; }
/// <summary> /// Converts the given <see cref="ZincSolveType"/> instance to its solve type literal. /// </summary> /// <returns>The solve type literal that represents the given <see cref="ZincSolveType"/>.</returns> /// <param name="solvetype">The given <see cref="ZincSolveType"/> to convert.</param> public static string SolveTypeLiteral(ZincSolveType solvetype) { Contract.Ensures(Contract.Result <string> () != null); Contract.Ensures(Contract.Result <string> ().Length > 0x00); return(solvetype.ToString().ToLower()); }
/// <summary> /// Initializes a new instance of the <see cref="ZincSolveItem"/> class with a given <see cref="ZincSolveType"/>, /// an <see cref="IZincExp"/> that must be minimized/maximized and some <see cref="ZincAnnotations"/>. /// </summary> /// <param name="annotations">The annotations provided for the task.</param> /// <param name="solveType">The task that must be carried out.</param> /// <param name="expression">The <see cref="IZincExp"/> that must be minized/maximized.</param> public ZincSolveItem(ZincAnnotations annotations, ZincSolveType solveType, IZincExp expression) : base(annotations,expression) { this.SolveType = solveType; }
/// <summary> /// Converts the given <see cref="ZincSolveType"/> instance to its solve type literal. /// </summary> /// <returns>The solve type literal that represents the given <see cref="ZincSolveType"/>.</returns> /// <param name="solvetype">The given <see cref="ZincSolveType"/> to convert.</param> public static string SolveTypeLiteral(ZincSolveType solvetype) { Contract.Ensures (Contract.Result<string> () != null); Contract.Ensures (Contract.Result<string> ().Length > 0x00); return solvetype.ToString ().ToLower (); }