Ejemplo n.º 1
0
            private IBase createNewBase(IBase b, IObjectiveScores <T> startingPoint, IObjectiveScores <T> endPoint)
            {
                IVector pathOfStage = createVector(startingPoint, endPoint);

                if (pathOfStage.IsNullVector)
                {
                    pathOfStage.SetAllComponents(1.0);
                }
                IBase result     = b.CreateNew(pathOfStage.Length);
                int   colinearTo = isColinearToBase(pathOfStage);

                if (colinearTo >= 0)
                {
                    return(result);
                }
                if (result.GetBaseVector(0).IsOrthogonal(pathOfStage))
                {
                    if (result.NumDimensions > 1)
                    {
                        if (!result.GetBaseVector(1).IsOrthogonal(pathOfStage))
                        {
                            result.SetBaseVector(1, pathOfStage);
                            result.Orthonormalize(1);
                        }
                    }
                    else
                    {
                        return(result);
                    }
                }
                else
                {
                    result.SetBaseVector(0, pathOfStage);
                    result.Orthonormalize(0);
                }
                return(result);
            }