Ejemplo n.º 1
0
 /// <summary>Initializes a new instance of the <see cref="LapackNativeWrapper" /> class.
 /// </summary>
 internal LapackNativeWrapper()
 {
     Name              = LongName = new IdentifierString("LAPACK");
     LinearEquations   = new LapackLinearEquations(this);
     EigenValues       = new LapackEigenvalues(this);
     AuxiliaryRoutines = new LapackAuxiliaryUtilityRoutines(this);
 }
Ejemplo n.º 2
0
        /// <summary>Initializes a new instance of the <see cref="LapackNativeWrapper" /> class.
        /// </summary>
        public LapackNativeWrapper()
        {
            Name            = LongName = new IdentifierString("LAPACK");
            LinearEquations = new LapackLinearEquations(
                MatrixConditionalNumbers.Create(),
                MatrixEquilibration.Create(),
                MatrixFactorization.Create(),
                MatrixInversion.Create(),
                Solver.Create(),
                ErrorEstimationSolver.Create());

            EigenValues = new LapackEigenvalues(
                GeneralizedNonsymmetricEigenvalueProblems.Create(),
                GeneralizedSymmetricEigenvalueProblems.Create(),
                NonSymmetricEigenvalueProblems.Create(),
                SymmetricEigenvalueProblems.Create(),
                SingularValueDecomposition.Create(),
                GeneralizedSingularValueDecomposition.Create(),
                LinearLeastSquaresProblems.Create());

            AuxiliaryRoutines = new LapackAuxiliaryUtilityRoutines(AuxiliaryUtilityRoutines.Create());
        }
Ejemplo n.º 3
0
        /// <summary>Initializes the <see cref="LAPACK"/> class.
        /// </summary>
        /// <remarks>This constructor takes into account the Managed Extensibility Framework (MEF) with respect to <see cref="LowLevelMathConfiguration"/>.</remarks>
        static LAPACK()
        {
            ILibrary lapack = null;

            try
            {
                lapack = LowLevelMathConfiguration.LAPACK.CreateFromConfigurationFile();
                if (lapack == null)
                {
                    lapack = LowLevelMathConfiguration.LAPACK.Libraries.Standard;  // can be null, i.e. fallback solution is perhaps not available
                    Logger.Stream.LogCritical(LowLevelMathConfigurationResources.LogFileMessageConfigFileUseDefaultImplementation, "LAPACK");
                }
            }
            catch (Exception e)  // thrown of Exceptions in static constructors should be avoided
            {
                Logger.Stream.LogError(e, LowLevelMathConfigurationResources.LogFileMessageCorruptConfigFile);

                lapack = LowLevelMathConfiguration.LAPACK.Libraries.Standard;
                Logger.Stream.LogError(LowLevelMathConfigurationResources.LogFileMessageConfigFileUseDefaultImplementation, "LAPACK");
            }
            EigenValues       = lapack.EigenValues;
            LinearEquations   = lapack.LinearEquations;
            AuxiliaryRoutines = lapack.AuxiliaryRoutines;
        }