abstract batch type

This commit is contained in:
Mike J Innes 2017-06-05 17:45:11 +01:00
parent da1697a257
commit 957e23eb6b
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
struct Batch{T,S} <: AbstractVector{T}
struct Batch{T,S} <: ABatch{T}
data::CatMat{T,S}
end

View File

@ -1,6 +1,8 @@
import Base: eltype, size, getindex, setindex!, convert
struct CatMat{T,S} <: AbstractVector{T}
ABatch{T} = AbstractVector{T}
struct CatMat{T,S} <: ABatch{T}
data::S
end

View File

@ -1,4 +1,4 @@
struct Seq{T,S} <: AbstractVector{T}
struct Seq{T,S} <: ABatch{T}
data::CatMat{T,S}
end