Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/src/lib/interfaces/AbstractBallp.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ A ball is a centrally-symmetric set with a characteristic p-norm.
AbstractBallp
```

This interface requires to implement the following functions:

```@docs
radius_ball(::AbstractBallp)
ball_norm(::AbstractBallp)
```

This interface defines the following functions:

```@docs
Expand Down
30 changes: 30 additions & 0 deletions src/Interfaces/AbstractBallp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,36 @@ they also implement other interfaces and hence cannot be subtypes: `Ball1` and
"""
abstract type AbstractBallp{N} <: AbstractCentrallySymmetric{N} end

"""
radius_ball(B::AbstractBallp)

Compute the radius of a p-norm ball.

### Input

- `B` -- p-norm ball

### Output

A number representing the radius.
"""
function radius_ball(::AbstractBallp) end

"""
ball_norm(B::AbstractBallp)

Determine the norm (p) of a p-norm ball.

### Input

- `B` -- p-norm ball

### Output

A number representing the norm.
"""
function ball_norm(::AbstractBallp) end

function low(B::AbstractBallp)
return _low_AbstractBallp(B)
end
Expand Down