possibility to slice DVTI field, i.e. f[1:3] works now

This commit is contained in:
Jukka Aho
2016-12-15 12:41:22 +02:00
parent 57d9bd35b2
commit e4cc2a6a03
+4
View File
@@ -174,6 +174,10 @@ function getindex(field::DVTI, i::Int64)
return field.data[i]
end
function getindex(field::DVTI, I::Array{Int64, 1})
return [field.data[i] for i in I]
end
function getindex(field::DCTV, i::Int64)
return field.data[i]
end