diff --git a/lib/SurrogatesPolyChaos/src/SurrogatesPolyChaos.jl b/lib/SurrogatesPolyChaos/src/SurrogatesPolyChaos.jl index 56c8fd2e..a10f3e8a 100644 --- a/lib/SurrogatesPolyChaos/src/SurrogatesPolyChaos.jl +++ b/lib/SurrogatesPolyChaos/src/SurrogatesPolyChaos.jl @@ -5,7 +5,8 @@ using PolyChaos export PolynomialChaosSurrogate, update! -mutable struct PolynomialChaosSurrogate{X, Y, L, U, C, O, N} <: AbstractDeterministicSurrogate +mutable struct PolynomialChaosSurrogate{X, Y, L, U, C, O, N} <: + AbstractDeterministicSurrogate x::X y::Y lb::L @@ -16,7 +17,7 @@ mutable struct PolynomialChaosSurrogate{X, Y, L, U, C, O, N} <: AbstractDetermin end function PolynomialChaosSurrogate(x, y, lb, ub; - op = MultiOrthoPoly([GaussOrthoPoly(2) for j in 1:length(lb)], 2)) + op = MultiOrthoPoly([GaussOrthoPoly(2) for j in 1:length(lb)], 2)) n = length(x) d = length(lb) poly_degree = op.deg @@ -70,7 +71,7 @@ function SurrogatesBase.update!(polych::PolynomialChaosSurrogate, x_new, y_new) polych.x = vcat(polych.x, x_new) polych.y = vcat(polych.y, y_new) polych.coeff = _calculatepce_coeff(polych.x, polych.y, polych.num_of_multi_indexes, - polych.ortopolys) + polych.ortopolys) nothing end