NArrayMiss is a additional class processing of missing value with to NArray for Ruby.
To use NArrayMiss class, you need invoking "require 'narray_miss.rb'" in your script.
NArrayMiss::BYTEtype code for 1 byte unsigned integer.
NArrayMiss::SINTtype code for 2 byte signed integer.
NArrayMiss::INTtype code for 4 byte signed integer.
NArrayMiss::SFLOATtype code for single precision float.
NArrayMiss::FLOATtype code for double precision float.
NArrayMiss::SCOMPLEXtype code for single precision complex.
NArrayMiss::COMPLEXtype code for double precision complex.
NArrayMiss::OBJECTtype code for Ruby object.
go back to Index
NArrayMiss.new(typecode, size, ...)create NArrayMiss of typecode.
All elements are initialized with 0.
NArrayMiss.byte(size, ...)same as NArrayMiss.new(NArrayMiss::BYTE, size, ...).
NArrayMiss.sint(size, ...)same as NArrayMiss.new(NArrayMiss::SINT, size, ...).
NArrayMiss.int(size, ...)same as NArrayMiss.new(NArrayMiss::INT, size, ...).
NArrayMiss.sfloat(size, ...)same as NArrayMiss.new(NArrayMiss::SFLOAT, size, ...).
NArrayMiss.float(size, ...)same as NArrayMiss.new(NArrayMiss::FLOAT, size, ...).
NArrayMiss.scomplex(size, ...)same as NArrayMiss.new(NArrayMiss::SCOMPLEX, size, ...).
NArrayMiss.complex(size, ...)same as NArrayMiss.new(NArrayMiss::COMPLEX, size, ...).
NArrayMiss.object(size, ...)same as NArrayMiss.new(NArrayMiss::OBJECT, size, ...).
NArrayMiss[](value, ...)create NArrayMiss form [value, ...].
NArrayMiss.to_nam(array [,mask])create NArrayMiss from array.
array must be Array or NArray.
NArrayMiss.to_nam_no_dup(array [,mask])convert from array to NArrayMiss.
go back to Index
NArrayMiss#dimreturn the dimension which is the number of indices.
NArrayMiss#ranksame as NArrayMiss#dim.
NArrayMiss#shapereturn the Array of sizes of each index.
NArrayMiss#sizereturn the number of total elements.
NArrayMiss#totalalias to size
NArrayMiss#lengthalias to size
NArrayMiss#rank_totalreturn the number of total of the shape.
NArrayMiss#typecodereturn the typecode.
NArrayMiss#[index]return the value at [index].
index must be Integer, Range, Array, true.
Index order is FORTRAN type.
NArrayMiss#slice(index)same as NArrayMiss#[] but keeps the rank of original array by not elimiting dimensions whose length became equal to 1 (which NArrayMiss#[] dose).
This is not the case with the 1-dimensional indexing and masking.
NArrayMiss#set_without_validation(index,value)replace elements at index by value.
NArrayMiss#[index] = valuereplace elements at index by value and make replaced elements valid.
NArrayMiss#indgen!([start[,step]])set values from start with step increment.
NArrayMiss#indgen([start[,step]])same as NArrayMiss#indgen! but create new object.
NArrayMiss#fill!(value)fill elements with value.
NArrayMiss#fill(value)same as NArrayMiss#fill! but create new object.
NArrayMiss#random!(max)set random values between 0<=x<max.
NArrayMiss#random(max)same as NArrayMiss#random! but create new object.
NArrayMiss#randomn(max)set normally distributed random values with mean=0, dispersion=1 (Box-Muller)
NArrayMiss#-@
NArrayMiss#+(other)
NArrayMiss#-(other)
NArrayMiss#*(other)
NArrayMiss#/(other)
NArrayMiss#%(other)
NArrayMiss#**(other)
NArrayMiss#abs
NArrayMiss#add!(other)
NArrayMiss#sbt!(other)
NArrayMiss#mul!(other)
NArrayMiss#div!(other)
NArrayMiss#mod!(other)
NArrayMiss#mul_add(other, dim, ...)
NArrayMiss#~@
NArrayMiss#&(other)
NArrayMiss#|(other)
NArrayMiss#^(other)
NArrayMiss#eq(other)
NArrayMiss#ne(other)
NArrayMiss#gt(other)
NArrayMiss#ge(other)
NArrayMiss#lt(other)
NArrayMiss#le(other)
NArrayMiss#>(other)
NArrayMiss#>=(other)
NArrayMiss#<(other)
NArrayMiss#<=(other)
NArrayMiss#and(other)
NArrayMiss#or(other)
NArrayMiss#xor(other)
NArrayMiss#not(other)
NArrayMiss#sum(dim, ... ["min_count"=>i])return summation of elements in specified dimensions. Elements at which the number of elements for summation is less than i is invalid.
NArrayMiss#accum(dim, ...)same as NArrayMiss#sum but not elimiting dimensions whose length became equal to 1.
NArrayMiss#min(dim, ...)return minimum in specified dimensions. Elements at which the number of valid elements in the dimension is less than i is invalid.
NArrayMiss#max(dim, ...)return maximum in specified dimensions. Elements at which the number of valid elements in the dimension is less than i is invalid.
NArrayMiss#mean(dim, ...)return mean of elements in specified dimensions. Elements at which the number of elements for then mean is less than i is invalid.
NArrayMiss#stddev(dim, ...)return standard deviation of elements in specified dimensions. Elements at which the number of elements for calculation the standard deviation is less than i is invalid.
NArrayMiss#sort(dim)sort in the 0..dim (All dimensions if omitted)
NArrayMiss#sort_index(dim)return index of sort result.
NArrayMiss#transpose(dim0, dim1, ...)transpose array. The 0-th dimension goes to the dim0-th dimension of new array.
NArrayMiss#reshape!(size, ...)change shape of array.
NArrayMiss#reshape(size, ...)same as NArrayMiss#reshape! but create new object.
NArrayMiss#shape=(size, ...)same as NArrayMiss#reshape!.
NArrayMiss#newdim!(dim)insert new dimension with size=1
NArrayMiss#newdim(dim)same as NArrayMiss#newdim! but create new object.
NArrayMiss#rewrank!(dim)same as NArrayMiss#newdim!.
NArrayMiss#rewrank=(dim)same as NArrayMiss#newdim!.
NArrayMiss#floorreturn NArrayMiss of integer whose elements processed floor.
NArrayMiss#ceilreturn NArrayMiss of integer whose elements processed ceil.
NArrayMiss#roundreturn NArrayMiss of integer whose elements processed round.
NArrayMiss#to_ireturn NArrayMiss of integer whose elements processed to_i.
NArrayMiss#to_freturn NArrayMiss of float whose elements processed to_f.
NArrayMiss#to_type(typecode)return NArrayMiss of typecode.
NArrayMiss#to_aconvert NArrayMiss to Array.
NArrayMiss#to_na!([missing_value])convert NArrayMiss to NArray.
if there is argument, set missing_value for invalid elements.
NArrayMiss#to_na([missing_value])convert NArrayMiss to NArray.
if there is argument, set missing_value for invalid elements.
NArrayMiss#to_sconvert NArrayMiss to String as a binary data.
NArrayMiss#to_stringcreate NArrayMiss of object whose elements are processed to_s
NArrayMiss#each{|x| ...}
NArrayMiss#each_valid{|x| ...}
NArrayMiss#each_valid_with_index{|x,i| ...}
NArrayMiss#collect{|x| ...}
NArrayMiss#collect!{|x| ...}
NArrayMiss#count_falsereturn the number of elements whose value==0 and valid.
NArrayMiss#count_truereturn the number of elements whose value!=0 and valid.
NArrayMiss#mask(mask)return NArrayMiss#get_mask!&mask.
NArrayMiss#all?return true if all the valid elements are not 0 else, false.
NArrayMiss#any?return true if any valid element is not 0 else, false.
NArrayMiss#none?return true if none of the valid elements is not 0 else, false.
NArrayMiss#wherereturn NArray of indices where valid elements are not 0.
NArrayMiss#where2return Array including two NArrays of indices,
where valid elements are not 0, and 0, respectively.
NArrayMiss#real
NArrayMiss#imag
NArrayMiss#conj
NArrayMiss#angle
NArrayMiss#imag=(other)
NArrayMiss#im
NArrayMiss#swap_byteswap byte order.
NArrayMiss#htonconvert to network byte order.
NArrayMiss#ntohconvert from network byte order.
NArrayMiss#htovconvert to VAX byte order.
NArrayMiss#vtohconvert from VAX byte order.
NArrayMiss#set_valid(index)validate element at index.
index must be Integer, Range, Array, or ture.
NArrayMiss#validation(index)alias to set_valid
NArrayMiss#set_invalid(index)invaliadate element at index.
index must be Integer, Range, Array, or ture.
NArrayMiss#invalidation(index)alias to set_invalid
NArrayMiss#all_validset all elements valid
NArrayMiss#all_invalidset all elements invalid
NArrayMiss#set_mask(mask)masking by mask
NArrayMiss#set_missing_value(value)replace invalid elements by value.
NArrayMiss#get_mask!return NArray of byte as mask.
NArrayMiss#get_maskreturn NArray of byte as mask.
NArrayMiss#get_array!return NArray as data.
NArrayMiss#get_arrayreturn NArray as data.
NArrayMiss#valid?return Array whose elements are true or false corresponding to valid or invalid of elements, respectively.
NArrayMiss#count_validreturn the number of valid elements.
NArrayMiss#count_invalidreturn the number of invalid elements.
NArrayMiss#integer?return true if NArrayMiss is byte, sint or int, else false.
NArrayMiss#complex?return true if NArrayMiss is scomplex or complex, else false.
NArrayMiss#dup
NArrayMiss#coerce(object)
NArrayMiss#inspect
go back to Index