Skip to content

Instantly share code, notes, and snippets.

@Hua-Zhou
Hua-Zhou / m012.jl
Created May 21, 2017 06:02 — forked from jiahao/m012.jl
Matvecs with matrices in PLINK v1 BEM format
import Base: convert, rand, size, getindex, A_mul_B!
immutable PLINK1Matrix <: AbstractMatrix{UInt8}
m :: Int
n :: Int
data :: Array{UInt8}
end
size(M::PLINK1Matrix, i::Int) = i==1 ? M.m : i==2 ? M.n : error()
size(M::PLINK1Matrix) = (M.m, M.n)