|
4 | 4 | # Base.show_default(io, v)
|
5 | 5 | Base.show(io::IO, ::MIME"text/plain", v::DFGVariable) = show(IOContext(io, :limit=>true, :compact=>true), v)
|
6 | 6 |
|
7 |
| -Base.show(io::IO, ::MIME"text/plain", f::DFGFactor) = show(IOContext(io, :limit=>true, :compact=>true), f) |
| 7 | +function Base.show(io::IO, ::MIME"text/plain", f::DFGFactor) |
| 8 | + # show(IOContext(io, :limit=>true, :compact=>true), f) |
| 9 | + fctt = getFactorType(f) |
| 10 | + println(io, "$(typeof(f))") |
| 11 | + println(io, " Name: $(f.label)") |
| 12 | + println(io, " VariableOrder: $(getVariableOrder(f))") |
| 13 | + println(io, " Multihypo: $(getSolverData(f).multihypo)") # FIXME #477 |
| 14 | + println(io, " Nullhypo: TBD") |
| 15 | + println(io, " Type: $(typeof(fctt))") |
| 16 | + println(io, " Fields: $(fieldnames(typeof(fctt)))") |
| 17 | + show(IOContext(io, :limit=>true, :compact=>true), fctt) |
| 18 | +end |
8 | 19 |
|
9 | 20 | function Base.show(io::IO, ::MIME"text/plain", dfg::AbstractDFG)
|
10 | 21 | summary(io, dfg)
|
11 |
| - println("\n UserId: ", dfg.userId) |
12 |
| - println(" RobotId: ", dfg.robotId) |
13 |
| - println(" SessionId: ", dfg.sessionId) |
14 |
| - println(" Description: ", dfg.description) |
15 |
| - println(" Nr variables: ", length(ls(dfg))) |
16 |
| - println(" Nr factors: ",length(lsf(dfg))) |
17 |
| - println(" User Data: ", keys(dfg.userData)) |
18 |
| - println(" Robot Data: ", keys(dfg.robotData)) |
19 |
| - println(" Session Data: ", keys(dfg.sessionData)) |
| 22 | + println(io, "\n UserId: ", dfg.userId) |
| 23 | + println(io, " RobotId: ", dfg.robotId) |
| 24 | + println(io, " SessionId: ", dfg.sessionId) |
| 25 | + println(io, " Description: ", dfg.description) |
| 26 | + println(io, " Nr variables: ", length(ls(dfg))) |
| 27 | + println(io, " Nr factors: ",length(lsf(dfg))) |
| 28 | + println(io, " User Data: ", keys(dfg.userData)) |
| 29 | + println(io, " Robot Data: ", keys(dfg.robotData)) |
| 30 | + println(io, " Session Data: ", keys(dfg.sessionData)) |
20 | 31 | end
|
21 | 32 |
|
22 | 33 |
|
|
0 commit comments