diff --git a/src/ISM.jl b/src/ISM.jl index 89fb9e0..e260344 100644 --- a/src/ISM.jl +++ b/src/ISM.jl @@ -3,7 +3,7 @@ export ISM function ISM( array::TxRxArray, tx::TxRx, - room::Room, + room::AbstractRoom, config::ISMConfig; ) Pn, o, B = array.p, array.origin, array.B @@ -17,7 +17,7 @@ end function ISM( rxs::AbstractVector{<:TxRx}, tx::TxRx, - room::Room, + room::AbstractRoom, config::ISMConfig; ) [ISM(rx, tx, room, config) for rx in rxs] diff --git a/src/moving_sources.jl b/src/moving_sources.jl index 082a0e7..aa0b2e2 100644 --- a/src/moving_sources.jl +++ b/src/moving_sources.jl @@ -7,8 +7,8 @@ function synth_movement( rx_path::AbstractVector{SVector{3, T}}, signal::AbstractVector{T}, tx::TxRx{T}, - room::Room, - config::RIRConfig, + room::AbstractRoom, + config::AbstractRIRConfig, W_max::Integer = 2^11, ) where {T<:Real} P, N = length(rx_path), length(signal) diff --git a/src/types.jl b/src/types.jl index e000981..5b53ec8 100644 --- a/src/types.jl +++ b/src/types.jl @@ -1,12 +1,12 @@ -export Room, RectangularRoom -export RIRConfig, ISMConfig +export AbstractRoom, RectangularRoom +export AbstractRIRConfig, ISMConfig -abstract type Room end +abstract type AbstractRoom end -struct RectangularRoom{T<:Real} <: Room +struct RectangularRoom{T<:Real} <: AbstractRoom c::T L::Tuple{T, T, T} β::Tuple{T, T, T, T, T, T} @@ -14,12 +14,12 @@ end -abstract type RIRConfig end +abstract type AbstractRIRConfig end """ """ -struct ISMConfig{T<:Real, I<:Integer, R<:AbstractRNG} <: RIRConfig +struct ISMConfig{T<:Real, I<:Integer, R<:AbstractRNG} <: AbstractRIRConfig order::Tuple{I, I} # Order of reflection [low, high] fs::T # Sampling frequency N::I # Number of samples in impulse response