Download data/DWSIM.Math.SwarmOps/WeightedProblem.cs from introvoyz041/Dwsim: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/datasets/introvoyz041/Dwsim/resolve/main/data/DWSIM.Math.SwarmOps/WeightedProblem.cs
- Command line
-
hf download hf://datasets/introvoyz041/Dwsim/data/DWSIM.Math.SwarmOps/WeightedProblem.cs
-
curl -L -o WeightedProblem.cs https://huggingface.co/datasets/introvoyz041/Dwsim/resolve/main/data/DWSIM.Math.SwarmOps/WeightedProblem.cs
1.59 kB
| /// ------------------------------------------------------ | |
| /// SwarmOps - Numeric and heuristic optimization for C# | |
| /// Copyright (C) 2003-2011 Magnus Erik Hvass Pedersen. | |
| /// Please see the file license.txt for license details. | |
| /// SwarmOps on the internet: http://www.Hvass-Labs.org/ | |
| /// ------------------------------------------------------ | |
| namespace SwarmOps | |
| { | |
| /// <summary> | |
| /// Problem and weight pair for use in meta-optimization. | |
| /// </summary> | |
| public class WeightedProblem | |
| { | |
| /// <summary> | |
| /// Construct the object, weight will be set to 1.0 | |
| /// </summary> | |
| /// <param name="problem">Problem object.</param> | |
| public WeightedProblem(Problem problem) | |
| : this(1.0, problem) | |
| { | |
| } | |
| /// <summary> | |
| /// Construct the object. | |
| /// </summary> | |
| /// <param name="weight">Weight.</param> | |
| /// <param name="problem">Problem object.</param> | |
| public WeightedProblem(double weight, Problem problem) | |
| { | |
| Weight = weight; | |
| Problem = problem; | |
| } | |
| /// <summary> | |
| /// Problem object. | |
| /// </summary> | |
| public Problem Problem | |
| { | |
| get; | |
| protected set; | |
| } | |
| /// <summary> | |
| /// Weight. | |
| /// </summary> | |
| public double Weight | |
| { | |
| get; | |
| protected set; | |
| } | |
| } | |
| } | |