qubx :: tree :: Data :: Class Data
[hide private]
[frames] | no frames]

Class Data

source code

object --+
         |
        Data

Instance Methods [hide private]
 
__init__(self, node)
Constructs a data handler for a qubtree node.
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code
 
__len__(self) source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, val) source code
 
get_node(self) source code
 
setup(self, type, rows, cols)
Discards any data and sets up space for rows*cols of the specified type.
source code
 
resize(self, nr, type_if_none=13)
Changes the number of rows allocated.
source code
 
clear(self)
Discards any data.
source code
 
loadRows(self, first=-2, last=-2, do_read=True)
Loads the rows from first up to and including last into memory.
source code
 
unloadRows(self, do_write=True)
Unloads any loaded data.
source code
 
read_rows(self, first=None, last=None)
Returns a copy of the data in rows first..last
source code
 
write_rows(self, first, last, data)
Replaces the data in rows first..last with the given data.
source code
 
get_rows(self, first, last)
Returns a slice into the first..last rows of data.
source code
 
row(self, i)
Returns an object that can manipulate the data in row i, and acts like a list.
source code
 
col(self, j)
Returns an object that can manipulate the data in column j, and acts like a list.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  node
the qubtree node whose data this is
  preload
whether all data is loaded into memory on file open
  count
total data elements (rows * cols)
  rows
number of rows
  cols
number of columns
  type
type of data elements, in QTR_TYPE_*
  size
size of one data element in bytes
  loaded
(first, last) element loaded into memory
  loadedRows
(first, last) row loaded into memory
  __node

Inherited from object: __class__

Method Details [hide private]

__init__(self, node)
(Constructor)

source code 

Constructs a data handler for a qubtree node. Don't call this directly.

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

loadRows(self, first=-2, last=-2, do_read=True)

source code 

Loads the rows from first up to and including last into memory. By default loads all.

In this numpy flavor, all data is always loaded (memory mapped), and loadRows just adjusts .loadedRows.

unloadRows(self, do_write=True)

source code 

Unloads any loaded data.

In this numpy flavor, all data is always loaded (memory mapped), and unloadRows just adjusts .loadedRows.

get_rows(self, first, last)

source code 

Returns a slice into the first..last rows of data. If possible, it will be a direct, mutable reference. This may not be possible with some string data.


Property Details [hide private]

node

the qubtree node whose data this is

Get Method:
get_node(self)

preload

whether all data is loaded into memory on file open

Get Method:
unreachable(self)
Set Method:
unreachable(self, x)

count

total data elements (rows * cols)

Get Method:
__len__(self)

rows

number of rows

Get Method:
unreachable(self)

cols

number of columns

Get Method:
unreachable(self)

type

type of data elements, in QTR_TYPE_*

Get Method:
unreachable(self)

size

size of one data element in bytes

Get Method:
unreachable(self)

loaded

(first, last) element loaded into memory

Get Method:
unreachable(self)

loadedRows

(first, last) row loaded into memory

Get Method:
unreachable(self)