class MMF_UserFormulaTransform(common.ulb:UserTransform) {
; A roll-your-own formula<br>
public:
import "common.ulb"
; @param pparent the parent, generally "this" for the parent, or zero
func MMF_UserFormulaTransform(Generic pparent)
UserTransform.UserTransform(pparent)
endfunc
complex func Iterate(complex pz)
; m_Iterations = m_Iterations + 1 not used in this transform
complex z1 = @p_coeff1*@p_func1(pz)^@p_power1
if @p_numterms>0
z1 = z1 + @p_coeff2*@p_func2(pz)^@p_power2
endif
if @p_numterms>1
z1 = z1 + @p_coeff3*@p_func3(pz)^@p_power3
endif
if @p_numterms>2
z1 = z1 + @p_coeff4*@p_func4(pz)^@p_power4
endif
if @p_numterms>3
z1 = z1 + @p_coeff5*@p_func5(pz)^@p_power5
endif
if @p_numterms>4
z1 = z1 + @p_coeff6*@p_func6(pz)^@p_power6
endif
if @p_numterms>5
z1 = z1 + @p_coeff7*@p_func7(pz)^@p_power7
endif
if @p_numterms>6
z1 = z1 + @p_coeff8*@p_func8(pz)^@p_power8
endif
if @p_numterms>7
z1 = z1 + @p_coeff9*@p_func9(pz)^@p_power9
endif
if @p_numterms>8
z1 = z1 + @p_coeff10*@p_func10(pz)^@p_power10
endif
return z1
endfunc
default:
title = "User Formula Transform"
int param p_numterms
caption = "Number of Terms"
enum = "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"
default = 0
endparam
heading
text = "The first term."
endheading
complex param p_coeff1
caption = "Coefficient 1"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
endparam
func p_func1
caption = "Function 1"
default = ident()
hint = "The function, f, in c*f(z)^p."
endfunc
complex param p_power1
caption = "Power 1"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
endparam
heading
text = "The second term."
visible = @p_numterms>0
endheading
complex param p_coeff2
caption = "Coefficient 2"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>0
endparam
func p_func2
caption = "Function 2"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>0
endfunc
complex param p_power2
caption = "Power 2"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>0
endparam
heading
text = "The third term."
visible = @p_numterms>1
endheading
complex param p_coeff3
caption = "Coefficient 3"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>1
endparam
func p_func3
caption = "Function 3"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>1
endfunc
complex param p_power3
caption = "Power 3"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>1
endparam
heading
text = "The fourth term."
visible = @p_numterms>2
endheading
complex param p_coeff4
caption = "Coefficient 4"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>2
endparam
func p_func4
caption = "Function 4"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>2
endfunc
complex param p_power4
caption = "Power 4"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>2
endparam
heading
text = "The fifth term."
visible = @p_numterms>3
endheading
complex param p_coeff5
caption = "Coefficient 5"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>3
endparam
func p_func5
caption = "Function 5"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>3
endfunc
complex param p_power5
caption = "Power 5"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>3
endparam
heading
text = "The sixth term."
visible = @p_numterms>4
endheading
complex param p_coeff6
caption = "Coefficient 6"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>4
endparam
func p_func6
caption = "Function 6"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>4
endfunc
complex param p_power6
caption = "Power 6"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>4
endparam
heading
text = "The seventh term."
visible = @p_numterms>5
endheading
complex param p_coeff7
caption = "Coefficient 7"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>5
endparam
func p_func7
caption = "Function 7"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>5
endfunc
complex param p_power7
caption = "Power 7"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>5
endparam
heading
text = "The eighth term."
visible = @p_numterms>6
endheading
complex param p_coeff8
caption = "Coefficient 8"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>6
endparam
func p_func8
caption = "Function 8"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>6
endfunc
complex param p_power8
caption = "Power 8"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>6
endparam
heading
text = "The ninth term."
visible = @p_numterms>7
endheading
complex param p_coeff9
caption = "Coefficient 9"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>7
endparam
func p_func9
caption = "Function 9"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>7
endfunc
complex param p_power9
caption = "Power 9"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>7
endparam
heading
text = "The tenth term."
visible = @p_numterms>8
endheading
complex param p_coeff10
caption = "Coefficient 10"
default = (1,0)
hint = "The coefficient, c, in c*f(z)^p."
visible = @p_numterms>8
endparam
func p_func10
caption = "Function 10"
default = ident()
hint = "The function, f, in c*f(z)^p."
visible = @p_numterms>8
endfunc
complex param p_power10
caption = "Power 10"
default = (1,0)
hint = "The power, p, in c*f(z)^p."
visible = @p_numterms>8
endparam
}