Skip to content

Commit

Permalink
make ProjectionStyle abstract type so we can subtype in downstream pa…
Browse files Browse the repository at this point in the history
…ckages. add a few lines of docs
  • Loading branch information
vpuri3 committed Jul 9, 2023
1 parent 1cc9ca0 commit d53f57d
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions src/definitions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -583,12 +583,30 @@ plan_brfft

##############################################################################

struct NoProjectionStyle end
struct RealProjectionStyle end
struct RealInverseProjectionStyle
abstract type ProjectionStyle end

"""
NoProjectionStyle()
Projection style for complex to complex discrete Fourier transform
"""
struct NoProjectionStyle <: ProjectionStyle end

"""
RealProjectionStyle()
Projection style for complex to real discrete Fourier transform
"""
struct RealProjectionStyle <: ProjectionStyle end

"""
RealInverseProjectionStyle()
Projection style for inverse of complex to real discrete Fourier transform
"""
struct RealInverseProjectionStyle <: ProjectionStyle
dim::Int
end
const ProjectionStyle = Union{NoProjectionStyle, RealProjectionStyle, RealInverseProjectionStyle}

output_size(p::Plan) = _output_size(p, ProjectionStyle(p))
_output_size(p::Plan, ::NoProjectionStyle) = size(p)
Expand Down

0 comments on commit d53f57d

Please sign in to comment.