001/*
002 *  Copyright 2013 Chris Pheby
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.jadira.quant.exception;
017
018/**
019 * Indicates a problem arising during evaluation
020 */
021public class IntervalBisectionOutOfRangeException extends RuntimeException {
022
023        private static final long serialVersionUID = 8651549079422635405L;
024
025        private double lowerRange;
026        private double upperRange;
027
028        /**
029     * Constructs an {@code IntervalBisectionOutOfRangeException} for the given input values.
030     * @param lowerRange The requested lower range for the failed bisection
031     * @param upperRange The requested upper range for the failed bisection
032     */
033    public IntervalBisectionOutOfRangeException(double lowerRange, double upperRange) {
034        super("The BisectionInterval cannot be found for the inputs {" + lowerRange + ", " + upperRange + "}");
035        this.lowerRange = lowerRange;
036        this.upperRange = upperRange;
037    }
038
039        public double getLowerRange() {
040                return lowerRange;
041        }
042
043        public double getUpperRange() {
044                return upperRange;
045        }
046}