Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/numeric/decision_rules/compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ end
#
evaluate(dr::AbstractDecisionRule{<:UCGrid, <:UCGrid}, x::Vector{Float64}, y::Matrix{Float64}) = evaluate(dr, repeat(x', size(y,1)), y)
evaluate(dr::AbstractDecisionRule{<:UCGrid, <:UCGrid}, x::Vector{Float64}, y::Vector{Float64}) = evaluate(dr, vector_to_matrix(x), vector_to_matrix(y))
evaluate(dr::AbstractDecisionRule{UCGrid{d1}, UCGrid{d2}}, z::AbstractMatrix) where d1 where d2 = evaluate(dr, [z[:,1:d1] z[:,1:(d1+1:end)]])
# # evaluate(dr::AbstractDecisionRule{UCGrid{d1}, UCGrid{d2}}, z::AbstractMatrix) where d1 where d2 = evaluate(dr, [z[:,1:d1] z[:,1:(d1+1:end)]])
evaluate(dr::AbstractDecisionRule{<:UCGrid, <:UCGrid}, z::Vector{Float64}) = vec(evaluate(dr,vector_to_matrix(z)))
evaluate(dr::AbstractDecisionRule{UCGrid{d1}, UCGrid{d2}}, i::Int, y::Union{Vector{Float64},AbstractMatrix{Float64}}) where d1 where d2 = evaluate(dr,node(dr.grid_exo,i), y)
# evaluate(dr::AbstractDecisionRule{UCGrid{d1}, UCGrid{d2}}, i::Int, y::Union{Vector{Float64},AbstractMatrix{Float64}}) where d1 where d2 = evaluate(dr,node(dr.grid_exo,i), y)


function set_values!(dr::AbstractDecisionRule{<:UCGrid, <:UCGrid, n_x}, vals::Vector{Matrix{Float64}}) where n_x
Expand Down
2 changes: 2 additions & 0 deletions src/numeric/decision_rules/csplines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function evaluate(dr::CubicDR{EmptyGrid{d1},UCGrid{d}}, y::Vector{Float64}) wher
return [p...]
end

evaluate(dr::CubicDR{EmptyGrid{d1},UCGrid{d}}, i, y) where d where d1 = evaluate(dr, y)

####
#### 2 CartesianGrid continous arguments d.r.
####
Expand Down