Mercurial > repos > public > sbplib_julia
comparison Notes.md @ 1110:c0bff9f6e0fb feature/lazy_tensors/pretty_printing
Add show(io,x) methods
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 23 May 2022 07:20:27 +0200 |
parents | 396278072f18 |
children |
comparison
equal
deleted
inserted
replaced
1102:84820d4780fa | 1110:c0bff9f6e0fb |
---|---|
69 If possible the goal should be for the parsing to get all the way to the | 69 If possible the goal should be for the parsing to get all the way to the |
70 stencils so that a user calls `read_stencil_set` and gets a | 70 stencils so that a user calls `read_stencil_set` and gets a |
71 dictionary-structure containing stencils, tuples, scalars and other types | 71 dictionary-structure containing stencils, tuples, scalars and other types |
72 ready for input to the methods creating the operators. | 72 ready for input to the methods creating the operators. |
73 | 73 |
74 ## Pretty printing | |
75 From the documentation of `show` it seems that the correct way to setup | |
76 printing of instances is to let `show(x)` print valid julia code for creating | |
77 the instance if possible. With a specified MIME type | |
78 `show(::IO, ::MIME"text/plain", x)` should print a human readable, possible | |
79 more verbose version. Compare to what the standard library does for regular | |
80 vectors. | |
81 | |
74 ## Variable second derivative | 82 ## Variable second derivative |
75 | 83 |
76 2020-12-08 after discussion with Vidar: | 84 2020-12-08 after discussion with Vidar: |
77 We will have to handle the variable second derivative in a new variant of | 85 We will have to handle the variable second derivative in a new variant of |
78 VolumeOperator, "SecondDerivativeVariable?". Somehow it needs to know about | 86 VolumeOperator, "SecondDerivativeVariable?". Somehow it needs to know about |