1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2024-11-08 22:21:08 +00:00

Compact latex tables

This commit is contained in:
Mo8it 2022-01-30 20:46:21 +01:00
parent ee815fdae0
commit b55ef91d2d
3 changed files with 5 additions and 4 deletions

View file

@ -107,7 +107,7 @@ function gen_action_space_labels(action_label::String, action_space::AbstractRan
labels = Vector{LaTeXStrings.LaTeXString}(undef, length(action_space)) labels = Vector{LaTeXStrings.LaTeXString}(undef, length(action_space))
for (action_ind, action) in enumerate(action_space) for (action_ind, action) in enumerate(action_space)
labels[action_ind] = LaTeXStrings.latexstring( labels[action_ind] = LaTeXStrings.latexstring(
action_label * " = $(round(action; digits=2))" "\$" * action_label * "\$=$(round(action; digits=2))"
) )
end end

View file

@ -166,8 +166,9 @@ function gen_state_space_labels(state_label::String, state_space::Vector{Interva
labels = Vector{LaTeXStrings.LaTeXString}(undef, length(state_space)) labels = Vector{LaTeXStrings.LaTeXString}(undef, length(state_space))
for (state_ind, state) in enumerate(state_space) for (state_ind, state) in enumerate(state_space)
labels[state_ind] = LaTeXStrings.latexstring( labels[state_ind] = LaTeXStrings.latexstring(
"\$" *
state_label * state_label *
" = $(round(state.first; digits=2)):$(round(state.last, digits=2))", "\$=$(round(state.first; digits=2)):$(round(state.last, digits=2))",
) )
end end

View file

@ -24,7 +24,7 @@ function latex_rl_table(env_helper, filename::String)
states = AbstractString[] states = AbstractString[]
for i in state_spaces_labels[1] for i in state_spaces_labels[1]
for j in state_spaces_labels[2] for j in state_spaces_labels[2]
push!(states, i * " ; " * j) push!(states, i * ";" * j)
end end
end end
@ -33,7 +33,7 @@ function latex_rl_table(env_helper, filename::String)
for i in action_spaces_labels[1] for i in action_spaces_labels[1]
for j in action_spaces_labels[2] for j in action_spaces_labels[2]
push!(actions, i * " ; " * j) push!(actions, i * ";" * j)
end end
end end