Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
fixed comments on comments

Co-authored-by: Anton Reinhard <s1509337@msx.tu-dresden.de>
  • Loading branch information
szabo137 and Anton Reinhard authored Oct 5, 2023
1 parent 2a37a0f commit c5744ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/interfaces/setup_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ quantity depends on is kept constant.
_assert_valid_input(stp::AbstractComputationSetup, input)
```
which should throw and an exception subtyped from [`AbstractInvalidInputException`](@ref) if the `input` is not valid for the computation of the associated quantity ([`_assert_valid_input`](@ref) for more details).
which should throw and an exception subtyped from [`AbstractInvalidInputException`](@ref) if the `input` is not valid for the computation of the associated quantity (see [`_assert_valid_input`](@ref) for more details).
The default implementation does nothing, i.e. every input is valid by default. Provide a custom implementation if a different behavior is required.
## Actual computation
Expand Down Expand Up @@ -92,13 +92,13 @@ Interface function, which asserts that the given `input` is valid, and throws an
!!! note "default implementation"
By default, every input is assumed to be valid. Therefore, this functions does nothing.
To customize this behavior add your own implementation of
By default, every input is assumed to be valid. Therefore, this function does nothing.
To customize this behavior, add your own implementation of
```Julia
_assert_valid_input(stp::YourCustomSetup,input)
```
which should throw an exception, which is subtype of [`AbstractInvalidInputError`](@ref). One may also use the concrete implementation [`InvalidInputError`](@ref) if the input is invalid, instead of writing a custom exception type.
which should throw an exception, which is a subtype of [`AbstractInvalidInputError`](@ref). One may also use the concrete implementation [`InvalidInputError`](@ref) if the input is invalid instead of writing a custom exception type.
"""
@inline function _assert_valid_input(stp::AbstractComputationSetup, input)
Expand Down Expand Up @@ -129,7 +129,7 @@ Interface function that returns the value of the associated quantity evaluated o
!!! note "unsafe implementation"
This function must be implemented for any subtype of [`AbstractComputationSetup`]. It should not do any input validation or post processing (see [`_assert_valid_input`](@ref) and [`_post_processing`](@ref)), as those two are performed while calling
This function must be implemented for any subtype of [`AbstractComputationSetup`](@ref). It should not do any input validation or post processing (see [`_assert_valid_input`](@ref) and [`_post_processing`](@ref)), as those two are performed while calling
the safe version of this function [`compute`](@ref).
"""
Expand Down

0 comments on commit c5744ff

Please sign in to comment.