Пример #1
0
        static bool TryUse(ILinearAlgebraProvider provider)
        {
            try
            {
                if (!provider.IsAvailable())
                {
                    return(false);
                }

                Provider = provider;
                return(true);
            }
            catch
            {
                // intentionally swallow exceptions here - use the explicit variants if you're interested in why
                return(false);
            }
        }
        static bool TryUse(ILinearAlgebraProvider provider)
        {
            try
            {
                if (!provider.IsAvailable())
                {
                    return false;
                }

                Control.LinearAlgebraProvider = provider;
                return true;
            }
            catch
            {
                // intentionally swallow exceptions here - use the explicit variants if you're interested in why
                return false;
            }
        }