Created
December 7, 2012 20:27
-
-
Save StefanKarpinski/4236254 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type DataVec{T} <: AbstractDataVec{T} | |
| data::Vector{T} | |
| na::BitVector | |
| # Sanity check that new data values and missingness metadata match | |
| function DataVec(data::Vector{T}, na::BitVector) | |
| if length(data) != length(na) | |
| error("data and NA vectors not the same length!") | |
| end | |
| new(data,na) | |
| end | |
| end | |
| DataVec{T}(data::Vector{T}, na::BitVector) = DataVec{T}(data,na) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
forall T type DataVec{T} <: AbstractDataVec{T} data::Vector{T} na::BitVector # Sanity check that new data values and missingness metadata match function DataVec(data::Vector{T}, na::BitVector) if length(data) != length(na) error("data and NA vectors not the same length!") end new(data,na) end end DataVec(data::Vector{T}, na::BitVector) = DataVec{T}(data,na) end