Skip to content

Commit

Permalink
doc: enhance explanation
Browse files Browse the repository at this point in the history
Merge pages
  • Loading branch information
JSS95 committed Oct 11, 2023
1 parent 891b057 commit 4c4e411
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
Core class design
=================

.. _generic:

Generic typing
--------------

.. _caching:

Caching
=======
-------

Caching of methods **MUST** be done in the instance itself, not in
an external container.
Expand All @@ -15,3 +23,18 @@ soon crash.
It is generally OK to use external caching in experiment class and analysis
class, as they need relatively small memory space. Of course, this does not
hold if your implementations require large memory space.

__slots__
---------

Classes in DipcoatImage-FiniteDepth intentionally not define
:obj:`~object.__slots__`.

Slots are useful when large number of objects simultaneously exist,
which is unlikely in our case where each object consumes large memory
because of the image data it stores. Instead of constructing multiple
objects, we need to handle small number of objects and destroy them
as soon as possible. Hence, having slots does more harm than good.

Verifying
---------
4 changes: 0 additions & 4 deletions doc/source/explanation/generic.rst

This file was deleted.

4 changes: 1 addition & 3 deletions doc/source/explanation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ Explanations
install
documentation
testing
slots
caching
generic
design
error-notes
11 changes: 0 additions & 11 deletions doc/source/explanation/slots.rst

This file was deleted.

0 comments on commit 4c4e411

Please sign in to comment.