Example #1
0
            /// <summary>Initializes a new instance of the <see cref="Algorithm"/> class.
            /// </summary>
            /// <param name="optimizer">The <see cref="LevenbergMarquardtOptimizer"/> object that serves as factory of the current object.</param>
            /// <param name="constraints">A collection of contraints for the optimization algorithm represented by the current instance, where each constraint has been created via a specific function of property <see cref="MultiDimOptimizer.Constraint"/>.</param>
            internal Algorithm(LevenbergMarquardtOptimizer optimizer, IConstraint[] constraints)
            {
                m_Optimizer = optimizer ?? throw new ArgumentNullException(nameof(optimizer));

                /* each constraint should be specified in its MultiDimOptimizerConstraint representation which contains the RegionRepresentation */
                m_ProjectionOntoFeasibleSet = FeasibleSetProjection.Create(constraints.Cast <MultiDimOptimizerConstraint>().Select(x => x.RegionRepresentation), new GoldfarbIdanaQuadraticProgram());
            }
Example #2
0
 /// <summary>Initializes a new instance of the <see cref="Algorithm"/> class.
 /// </summary>
 /// <param name="optimizer">The <see cref="LevenbergMarquardtOptimizer"/> object that serves as factory of the current object.</param>
 /// <param name="dimension">The dimension of the feasible region.</param>
 internal Algorithm(LevenbergMarquardtOptimizer optimizer, int dimension)
 {
     m_Optimizer = optimizer ?? throw new ArgumentNullException(nameof(optimizer));
     if (dimension <= 0)
     {
         throw new ArgumentOutOfRangeException(nameof(dimension));
     }
     m_ProjectionOntoFeasibleSet = FeasibleSetProjection.Create(dimension);
 }
Example #3
0
 /// <summary>Initializes a new instance of the <see cref="Algorithm"/> class.
 /// </summary>
 /// <param name="optimizer">The <see cref="LevenbergMarquardtOptimizer"/> object that serves as factory of the current object.</param>
 /// <param name="boxConstraints">The box constraints.</param>
 internal Algorithm(LevenbergMarquardtOptimizer optimizer, MultiDimRegion.Interval boxConstraints)
 {
     m_Optimizer = optimizer ?? throw new ArgumentNullException(nameof(optimizer));
     m_ProjectionOntoFeasibleSet = FeasibleSetProjection.Create(boxConstraints);
 }