<s> from __future__ import print_function <EOL> from __future__ import unicode_literals <EOL> from __future__ import absolute_import <EOL> import sys , os <EOL> if os . path . join ( sys . path [ <NUM_LIT:0> ] [ : sys . path [ <NUM_LIT:0> ] . rfind ( os . sep ) ] , '<STR_LIT:..>' ) not in sys . path : <EOL> sys . path . append ( os . path . join ( sys . path [ <NUM_LIT:0> ] [ : sys . path [ <NUM_LIT:0> ] . rfind ( os . sep ) ] , '<STR_LIT:..>' ) ) <EOL> import pyeq2 <EOL> import numpy <EOL> numpy . seterr ( all = '<STR_LIT:ignore>' ) <EOL> import pyeq2 . Model_3D_BaseClass <EOL> class FullCubic ( pyeq2 . Model_3D_BaseClass . Model_3D_BaseClass ) : <EOL> _baseName = "<STR_LIT>" <EOL> _HTML = '<STR_LIT>' <EOL> _leftSideHTML = '<STR_LIT:z>' <EOL> _coefficientDesignators = [ '<STR_LIT:a>' , '<STR_LIT:b>' , '<STR_LIT:c>' , '<STR_LIT:d>' , '<STR_LIT:f>' , '<STR_LIT:g>' , '<STR_LIT:h>' , '<STR_LIT:i>' , '<STR_LIT>' , '<STR_LIT:k>' ] <EOL> _canLinearSolverBeUsedForSSQABS = True <EOL> webReferenceURL = '<STR_LIT>' <EOL> baseEquationHasGlobalMultiplierOrDivisor_UsedInExtendedVersions = False <EOL> autoGenerateOffsetForm = False <EOL> autoGenerateReciprocalForm = True <EOL> autoGenerateInverseForms = True <EOL> autoGenerateGrowthAndDecayForms = True <EOL> independentData1CannotContainZeroFlag = False <EOL> independentData1CannotContainPositiveFlag = False <EOL> independentData1CannotContainNegativeFlag = False <EOL> independentData2CannotContainZeroFlag = False <EOL> independentData2CannotContainPositiveFlag = False <EOL> independentData2CannotContainNegativeFlag = False <EOL> def GetDataCacheFunctions ( self ) : <EOL> functionList = [ ] <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Ones ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . X ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Y ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . XY ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX_PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> , <NUM_LIT:1.0> ] ) , [ <NUM_LIT> , <NUM_LIT:1.0> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX_PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT:1.0> , <NUM_LIT> ] ) , [ <NUM_LIT:1.0> , <NUM_LIT> ] ] ) <EOL> return self . extendedVersionHandler . GetAdditionalDataCacheFunctions ( self , functionList ) <EOL> def CalculateModelPredictions ( self , inCoeffs , inDataCacheDictionary ) : <EOL> x_in = inDataCacheDictionary [ '<STR_LIT:X>' ] <EOL> y_in = inDataCacheDictionary [ '<STR_LIT:Y>' ] <EOL> PowX_2 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> PowY_2 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> PowX_3 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> Powy_3 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> XY = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> PowX_PowY_21 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> PowX_PowY_12 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> a = inCoeffs [ <NUM_LIT:0> ] <EOL> b = inCoeffs [ <NUM_LIT:1> ] <EOL> c = inCoeffs [ <NUM_LIT:2> ] <EOL> d = inCoeffs [ <NUM_LIT:3> ] <EOL> f = inCoeffs [ <NUM_LIT:4> ] <EOL> g = inCoeffs [ <NUM_LIT:5> ] <EOL> h = inCoeffs [ <NUM_LIT:6> ] <EOL> i = inCoeffs [ <NUM_LIT:7> ] <EOL> j = inCoeffs [ <NUM_LIT:8> ] <EOL> k = inCoeffs [ <NUM_LIT:9> ] <EOL> try : <EOL> temp = a <EOL> temp += b * x_in <EOL> temp += c * y_in <EOL> temp += d * PowX_2 <EOL> temp += f * PowY_2 <EOL> temp += g * PowX_3 <EOL> temp += h * Powy_3 <EOL> temp += i * XY <EOL> temp += j * PowX_PowY_21 <EOL> temp += k * PowX_PowY_12 <EOL> return self . extendedVersionHandler . GetAdditionalModelPredictions ( temp , inCoeffs , inDataCacheDictionary , self ) <EOL> except : <EOL> return numpy . ones ( len ( inDataCacheDictionary [ '<STR_LIT>' ] ) ) * <NUM_LIT> <EOL> def SpecificCodeCPP ( self ) : <EOL> s = "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> return s <EOL> class FullQuadratic ( pyeq2 . Model_3D_BaseClass . Model_3D_BaseClass ) : <EOL> _baseName = "<STR_LIT>" <EOL> _HTML = '<STR_LIT>' <EOL> _leftSideHTML = '<STR_LIT:z>' <EOL> _coefficientDesignators = [ '<STR_LIT:a>' , '<STR_LIT:b>' , '<STR_LIT:c>' , '<STR_LIT:d>' , '<STR_LIT:f>' , '<STR_LIT:g>' ] <EOL> _canLinearSolverBeUsedForSSQABS = True <EOL> webReferenceURL = '<STR_LIT>' <EOL> baseEquationHasGlobalMultiplierOrDivisor_UsedInExtendedVersions = False <EOL> autoGenerateOffsetForm = False <EOL> autoGenerateReciprocalForm = True <EOL> autoGenerateInverseForms = True <EOL> autoGenerateGrowthAndDecayForms = True <EOL> independentData1CannotContainZeroFlag = False <EOL> independentData1CannotContainPositiveFlag = False <EOL> independentData1CannotContainNegativeFlag = False <EOL> independentData2CannotContainZeroFlag = False <EOL> independentData2CannotContainPositiveFlag = False <EOL> independentData2CannotContainNegativeFlag = False <EOL> def GetDataCacheFunctions ( self ) : <EOL> functionList = [ ] <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Ones ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . X ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Y ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . XY ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> return self . extendedVersionHandler . GetAdditionalDataCacheFunctions ( self , functionList ) <EOL> def CalculateModelPredictions ( self , inCoeffs , inDataCacheDictionary ) : <EOL> x_in = inDataCacheDictionary [ '<STR_LIT:X>' ] <EOL> y_in = inDataCacheDictionary [ '<STR_LIT:Y>' ] <EOL> PowX_2 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> PowY_2 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> XY = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> a = inCoeffs [ <NUM_LIT:0> ] <EOL> b = inCoeffs [ <NUM_LIT:1> ] <EOL> c = inCoeffs [ <NUM_LIT:2> ] <EOL> d = inCoeffs [ <NUM_LIT:3> ] <EOL> f = inCoeffs [ <NUM_LIT:4> ] <EOL> g = inCoeffs [ <NUM_LIT:5> ] <EOL> try : <EOL> temp = a <EOL> temp += b * x_in <EOL> temp += c * y_in <EOL> temp += d * PowX_2 <EOL> temp += f * PowY_2 <EOL> temp += g * XY <EOL> return self . extendedVersionHandler . GetAdditionalModelPredictions ( temp , inCoeffs , inDataCacheDictionary , self ) <EOL> except : <EOL> return numpy . ones ( len ( inDataCacheDictionary [ '<STR_LIT>' ] ) ) * <NUM_LIT> <EOL> def SpecificCodeCPP ( self ) : <EOL> s = "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> return s <EOL> class Linear ( pyeq2 . Model_3D_BaseClass . Model_3D_BaseClass ) : <EOL> _baseName = "<STR_LIT>" <EOL> _HTML = '<STR_LIT>' <EOL> _leftSideHTML = '<STR_LIT:z>' <EOL> _coefficientDesignators = [ '<STR_LIT:a>' , '<STR_LIT:b>' , '<STR_LIT:c>' ] <EOL> _canLinearSolverBeUsedForSSQABS = True <EOL> webReferenceURL = '<STR_LIT>' <EOL> baseEquationHasGlobalMultiplierOrDivisor_UsedInExtendedVersions = False <EOL> autoGenerateOffsetForm = False <EOL> autoGenerateReciprocalForm = True <EOL> autoGenerateInverseForms = True <EOL> autoGenerateGrowthAndDecayForms = True <EOL> independentData1CannotContainZeroFlag = False <EOL> independentData1CannotContainPositiveFlag = False <EOL> independentData1CannotContainNegativeFlag = False <EOL> independentData2CannotContainZeroFlag = False <EOL> independentData2CannotContainPositiveFlag = False <EOL> independentData2CannotContainNegativeFlag = False <EOL> def GetDataCacheFunctions ( self ) : <EOL> functionList = [ ] <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Ones ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . X ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Y ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> return self . extendedVersionHandler . GetAdditionalDataCacheFunctions ( self , functionList ) <EOL> def CalculateModelPredictions ( self , inCoeffs , inDataCacheDictionary ) : <EOL> x_in = inDataCacheDictionary [ '<STR_LIT:X>' ] <EOL> y_in = inDataCacheDictionary [ '<STR_LIT:Y>' ] <EOL> a = inCoeffs [ <NUM_LIT:0> ] <EOL> b = inCoeffs [ <NUM_LIT:1> ] <EOL> c = inCoeffs [ <NUM_LIT:2> ] <EOL> try : <EOL> temp = a + b * x_in + c * y_in <EOL> return self . extendedVersionHandler . GetAdditionalModelPredictions ( temp , inCoeffs , inDataCacheDictionary , self ) <EOL> except : <EOL> return numpy . ones ( len ( inDataCacheDictionary [ '<STR_LIT>' ] ) ) * <NUM_LIT> <EOL> def SpecificCodeCPP ( self ) : <EOL> s = "<STR_LIT>" <EOL> return s <EOL> class SimplifiedCubic ( pyeq2 . Model_3D_BaseClass . Model_3D_BaseClass ) : <EOL> _baseName = "<STR_LIT>" <EOL> _HTML = '<STR_LIT>' <EOL> _leftSideHTML = '<STR_LIT:z>' <EOL> _coefficientDesignators = [ '<STR_LIT:a>' , '<STR_LIT:b>' , '<STR_LIT:c>' , '<STR_LIT:d>' , '<STR_LIT:f>' , '<STR_LIT:g>' , '<STR_LIT:h>' ] <EOL> _canLinearSolverBeUsedForSSQABS = True <EOL> webReferenceURL = '<STR_LIT>' <EOL> baseEquationHasGlobalMultiplierOrDivisor_UsedInExtendedVersions = False <EOL> autoGenerateOffsetForm = False <EOL> autoGenerateReciprocalForm = True <EOL> autoGenerateInverseForms = True <EOL> autoGenerateGrowthAndDecayForms = True <EOL> independentData1CannotContainZeroFlag = False <EOL> independentData1CannotContainPositiveFlag = False <EOL> independentData1CannotContainNegativeFlag = False <EOL> independentData2CannotContainZeroFlag = False <EOL> independentData2CannotContainPositiveFlag = False <EOL> independentData2CannotContainNegativeFlag = False <EOL> def GetDataCacheFunctions ( self ) : <EOL> functionList = [ ] <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Ones ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . X ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Y ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> return self . extendedVersionHandler . GetAdditionalDataCacheFunctions ( self , functionList ) <EOL> def CalculateModelPredictions ( self , inCoeffs , inDataCacheDictionary ) : <EOL> x_in = inDataCacheDictionary [ '<STR_LIT:X>' ] <EOL> y_in = inDataCacheDictionary [ '<STR_LIT:Y>' ] <EOL> PowX_2 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> PowY_2 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> PowX_3 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> Powy_3 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> a = inCoeffs [ <NUM_LIT:0> ] <EOL> b = inCoeffs [ <NUM_LIT:1> ] <EOL> c = inCoeffs [ <NUM_LIT:2> ] <EOL> d = inCoeffs [ <NUM_LIT:3> ] <EOL> f = inCoeffs [ <NUM_LIT:4> ] <EOL> g = inCoeffs [ <NUM_LIT:5> ] <EOL> h = inCoeffs [ <NUM_LIT:6> ] <EOL> try : <EOL> temp = a <EOL> temp += b * x_in <EOL> temp += c * y_in <EOL> temp += d * PowX_2 <EOL> temp += f * PowY_2 <EOL> temp += g * PowX_3 <EOL> temp += h * Powy_3 <EOL> return self . extendedVersionHandler . GetAdditionalModelPredictions ( temp , inCoeffs , inDataCacheDictionary , self ) <EOL> except : <EOL> return numpy . ones ( len ( inDataCacheDictionary [ '<STR_LIT>' ] ) ) * <NUM_LIT> <EOL> def SpecificCodeCPP ( self ) : <EOL> s = "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> return s <EOL> class SimplifiedQuadratic ( pyeq2 . Model_3D_BaseClass . Model_3D_BaseClass ) : <EOL> _baseName = "<STR_LIT>" <EOL> _HTML = '<STR_LIT>' <EOL> _leftSideHTML = '<STR_LIT:z>' <EOL> _coefficientDesignators = [ '<STR_LIT:a>' , '<STR_LIT:b>' , '<STR_LIT:c>' , '<STR_LIT:d>' , '<STR_LIT:f>' ] <EOL> _canLinearSolverBeUsedForSSQABS = True <EOL> webReferenceURL = '<STR_LIT>' <EOL> baseEquationHasGlobalMultiplierOrDivisor_UsedInExtendedVersions = False <EOL> autoGenerateOffsetForm = False <EOL> autoGenerateReciprocalForm = True <EOL> autoGenerateInverseForms = True <EOL> autoGenerateGrowthAndDecayForms = True <EOL> independentData1CannotContainZeroFlag = False <EOL> independentData1CannotContainPositiveFlag = False <EOL> independentData1CannotContainNegativeFlag = False <EOL> independentData2CannotContainZeroFlag = False <EOL> independentData2CannotContainPositiveFlag = False <EOL> independentData2CannotContainNegativeFlag = False <EOL> def GetDataCacheFunctions ( self ) : <EOL> functionList = [ ] <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Ones ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . X ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . Y ( NameOrValueFlag = <NUM_LIT:1> ) , [ ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ <NUM_LIT> ] ) , [ <NUM_LIT> ] ] ) <EOL> return self . extendedVersionHandler . GetAdditionalDataCacheFunctions ( self , functionList ) <EOL> def CalculateModelPredictions ( self , inCoeffs , inDataCacheDictionary ) : <EOL> x_in = inDataCacheDictionary [ '<STR_LIT:X>' ] <EOL> y_in = inDataCacheDictionary [ '<STR_LIT:Y>' ] <EOL> PowX_2 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> PowY_2 = inDataCacheDictionary [ '<STR_LIT>' ] <EOL> a = inCoeffs [ <NUM_LIT:0> ] <EOL> b = inCoeffs [ <NUM_LIT:1> ] <EOL> c = inCoeffs [ <NUM_LIT:2> ] <EOL> d = inCoeffs [ <NUM_LIT:3> ] <EOL> f = inCoeffs [ <NUM_LIT:4> ] <EOL> try : <EOL> temp = a <EOL> temp += b * x_in <EOL> temp += c * y_in <EOL> temp += d * PowX_2 <EOL> temp += f * PowY_2 <EOL> return self . extendedVersionHandler . GetAdditionalModelPredictions ( temp , inCoeffs , inDataCacheDictionary , self ) <EOL> except : <EOL> return numpy . ones ( len ( inDataCacheDictionary [ '<STR_LIT>' ] ) ) * <NUM_LIT> <EOL> def SpecificCodeCPP ( self ) : <EOL> s = "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> s += "<STR_LIT>" <EOL> return s <EOL> class UserSelectablePolynomial ( pyeq2 . Model_3D_BaseClass . Model_3D_BaseClass ) : <EOL> userSelectablePolynomialFlag = True <EOL> _baseName = "<STR_LIT>" <EOL> _canLinearSolverBeUsedForSSQABS = True <EOL> webReferenceURL = '<STR_LIT>' <EOL> baseEquationHasGlobalMultiplierOrDivisor_UsedInExtendedVersions = False <EOL> autoGenerateOffsetForm = False <EOL> autoGenerateReciprocalForm = False <EOL> autoGenerateInverseForms = True <EOL> autoGenerateGrowthAndDecayForms = True <EOL> independentData1CannotContainZeroFlag = False <EOL> independentData1CannotContainPositiveFlag = False <EOL> independentData1CannotContainNegativeFlag = False <EOL> independentData2CannotContainZeroFlag = False <EOL> independentData2CannotContainPositiveFlag = False <EOL> independentData2CannotContainNegativeFlag = False <EOL> def __init__ ( self , inFittingTarget = '<STR_LIT>' , inExtendedVersionName = '<STR_LIT>' , inXorder = None , inYorder = None ) : <EOL> pyeq2 . Model_3D_BaseClass . Model_3D_BaseClass . __init__ ( self , inFittingTarget , inExtendedVersionName ) <EOL> self . xPolynomialOrder = inXorder <EOL> self . yPolynomialOrder = inYorder <EOL> self . _leftSideHTML = '<STR_LIT:z>' <EOL> def GetCoefficientDesignators ( self ) : <EOL> self . _coefficientDesignators = list ( self . listOfAdditionalCoefficientDesignators [ : ( self . xPolynomialOrder + <NUM_LIT:1> ) * ( self . yPolynomialOrder + <NUM_LIT:1> ) ] ) <EOL> return self . extendedVersionHandler . AssembleCoefficientDesignators ( self ) <EOL> def GetDisplayHTML ( self ) : <EOL> if self . xPolynomialOrder == None : <EOL> self . _HTML = "<STR_LIT>" <EOL> else : <EOL> self . _HTML = "<STR_LIT>" <EOL> cd = self . GetCoefficientDesignators ( ) <EOL> indexmax = ( self . xPolynomialOrder + <NUM_LIT:1> ) * ( self . yPolynomialOrder + <NUM_LIT:1> ) <EOL> for i in range ( self . xPolynomialOrder + <NUM_LIT:1> ) : <EOL> for j in range ( self . yPolynomialOrder + <NUM_LIT:1> ) : <EOL> index = ( i * ( self . yPolynomialOrder + <NUM_LIT:1> ) ) + j <EOL> if index == <NUM_LIT:0> : <EOL> self . _HTML += cd [ index ] <EOL> else : <EOL> self . _HTML += cd [ index ] + '<STR_LIT>' + str ( i ) + '<STR_LIT>' + str ( j ) + '<STR_LIT>' <EOL> if ( i + <NUM_LIT:1> ) * ( j + <NUM_LIT:1> ) != indexmax : <EOL> self . _HTML += '<STR_LIT>' <EOL> return self . extendedVersionHandler . AssembleDisplayHTML ( self ) <EOL> def GetDataCacheFunctions ( self ) : <EOL> functionList = [ ] <EOL> for i in range ( self . xPolynomialOrder + <NUM_LIT:1> ) : <EOL> for j in range ( self . yPolynomialOrder + <NUM_LIT:1> ) : <EOL> functionList . append ( [ pyeq2 . DataCache . DataCacheFunctions . PowX_PowY ( NameOrValueFlag = <NUM_LIT:1> , args = [ float ( i ) , float ( j ) ] ) , [ float ( i ) , float ( j ) ] ] ) <EOL> return functionList <EOL> def CalculateModelPredictions ( self , inCoeffs , inDataCacheDictionary ) : <EOL> temp = <NUM_LIT:0.0> <EOL> coeffCount = <NUM_LIT:0> <EOL> try : <EOL> for i in range ( self . xPolynomialOrder + <NUM_LIT:1> ) : <EOL> for j in range ( self . yPolynomialOrder + <NUM_LIT:1> ) : <EOL> temp += inCoeffs [ coeffCount ] * eval ( "<STR_LIT>" + str ( i ) + "<STR_LIT>" + str ( j ) + "<STR_LIT>" ) <EOL> coeffCount += <NUM_LIT:1> <EOL> return self . extendedVersionHandler . GetAdditionalModelPredictions ( temp , inCoeffs , inDataCacheDictionary , self ) <EOL> except : <EOL> return numpy . ones ( len ( inDataCacheDictionary [ '<STR_LIT>' ] ) ) * <NUM_LIT> <EOL> def SpecificCodeCPP ( self ) : <EOL> coeffDesignators = self . GetCoefficientDesignators ( ) <EOL> s = "<STR_LIT>" <EOL> for i in range ( self . xPolynomialOrder + <NUM_LIT:1> ) : <EOL> for j in range ( self . yPolynomialOrder + <NUM_LIT:1> ) : <EOL> index = ( i * ( self . yPolynomialOrder + <NUM_LIT:1> ) ) + j <EOL> if i == <NUM_LIT:0> and j == <NUM_LIT:0> : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" <EOL> elif i == <NUM_LIT:1> and j == <NUM_LIT:0> : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" <EOL> elif i > <NUM_LIT:1> and j == <NUM_LIT:0> : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" + str ( i ) + "<STR_LIT>" <EOL> elif i > <NUM_LIT:1> and j == <NUM_LIT:1> : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" + str ( i ) + "<STR_LIT>" <EOL> elif i == <NUM_LIT:0> and j == <NUM_LIT:1> : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" <EOL> elif i == <NUM_LIT:0> and j > <NUM_LIT:1> : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" + str ( j ) + "<STR_LIT>" <EOL> elif i == <NUM_LIT:1> and j > <NUM_LIT:1> : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" + str ( j ) + "<STR_LIT>" <EOL> elif i == <NUM_LIT:1> and j == <NUM_LIT:1> : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" <EOL> else : <EOL> s += "<STR_LIT>" + coeffDesignators [ index ] + "<STR_LIT>" + str ( i ) + "<STR_LIT>" + str ( j ) + "<STR_LIT>" <EOL> return s </s>
