src/main/java/workshop5/Model/IntegrationModel.java
public static double calculateNumericalIntegrationP(IntegrationDistribution t) {

        double p = (t.getWidthSegment() / 3) * 1 * functionX(t.getxValue() * 0, t.getDof());
        for (int i = 1; i < t.getNumSeg(); i++) {
            if (i % 2 == 0) {
                p = p + (t.getWidthSegment() / 3) * 2 * functionX(t.getWidthSegment() * i, t.getDof());
            } else {
                p = p + (t.getWidthSegment() / 3) * 4 * functionX(t.getWidthSegment() * i, t.getDof());
            }

        }
        p = p + (t.getWidthSegment() / 3) * 1 * functionX(t.getxValue(), t.getDof());
        return p;
    }
/**
     * Method to calculate the numerical integration
     *
     * @param t T Distribution
     * 
     * @return p numerical integration
     */
Method to calculate the numerical integration
@param t T Distribution

@return p numerical integration
Method to calculate the numerical integration @param t T Distribution @return p numerical integration
public static double calculateNumericalIntegrationP(IntegrationDistribution t) {
        double p = (t.getWidthSegment() / 3) * 1 * functionX(t.getxValue() * 0, t.getDof());
        for (int i = 1; i < t.getNumSeg(); i++) {
            if (i % 2 == 0) {
                p = p + (t.getWidthSegment() / 3) * 2 * functionX(t.getWidthSegment() * i, t.getDof());
            } else {
                p = p + (t.getWidthSegment() / 3) * 4 * functionX(t.getWidthSegment() * i, t.getDof());
            }
        }
        p = p + (t.getWidthSegment() / 3) * 1 * functionX(t.getxValue(), t.getDof());
        return p;
    }
public static double calculateNumericalIntegrationP ( IntegrationDistribution t ) { double p = ( t . getWidthSegment ( ) / 3 ) * 1 * functionX ( t . getxValue ( ) * 0 , t . getDof ( ) ) ; for ( int i = 1 ; i < t . getNumSeg ( ) ; i ++ ) { if ( i % 2 == 0 ) { p = p + ( t . getWidthSegment ( ) / 3 ) * 2 * functionX ( t . getWidthSegment ( ) * i , t . getDof ( ) ) ; } else { p = p + ( t . getWidthSegment ( ) / 3 ) * 4 * functionX ( t . getWidthSegment ( ) * i , t . getDof ( ) ) ; } } p = p + ( t . getWidthSegment ( ) / 3 ) * 1 * functionX ( t . getxValue ( ) , t . getDof ( ) ) ; return p ; }
Method to calculate the numerical integration
 @param t T Distribution
Method to calculate the numerical integration @param t T Distribution