fcapy.context.BinTable

class fcapy.context.BinTable(data=None)

A class to encapsulate the work with binary tables in an efficient way

all(self, axis=None)

Return whether all elements (axis =0), rows in columns (axis =1), columns in rows (axis =2) are True

any(self, axis=None)

Return whether any element (axis =0), row in columns (axis =1), column in rows (axis =2) is True

sum(self, axis=None)

Return sum of all elements (axis =0), rows in columns (axis =1), columns in rows (axis =2)

arrow_up(self, row_indexes, base_columns=None)

Return the maximal set of columns in which all rows (row_indexes) are True

arrow_down(self, column_indexes, base_rows=None)

Return the maximal set of rows in which all columns (column_indexes) are True

__init__(data=None)

Initialize the BinTable

Parameters

data (list of list or bitsets.bases.BitSets) – Data for the BinTable to store

Methods

__init__([data])

Initialize the BinTable

all([axis])

Return whether all elements (axis =0), rows in columns (axis =1), columns in rows (axis =2) are True

any([axis])

Return whether any element (axis =0), row in columns (axis =1), column in rows (axis =2) is True

arrow_down(column_indexes[, base_rows])

Return the maximal set of rows in which all columns (column_indexes) are True

arrow_up(row_indexes[, base_columns])

Return the maximal set of columns in which all rows (row_indexes) are True

sum([axis])

Return sum of all elements (axis =0), rows in columns (axis =1), columns in rows (axis =2)

to_list()

Return BinTable data as a list of list

Attributes

data

Data for the BinTable to store

height

Number of rows in the table

shape

Shape of the table

width

Number of columns in the table

all(axis=None)

Return whether all elements (axis =0), rows in columns (axis =1), columns in rows (axis =2) are True

any(axis=None)

Return whether any element (axis =0), row in columns (axis =1), column in rows (axis =2) is True

arrow_down(column_indexes, base_rows=None)

Return the maximal set of rows in which all columns (column_indexes) are True

arrow_up(row_indexes, base_columns=None)

Return the maximal set of columns in which all rows (row_indexes) are True

property data

Data for the BinTable to store

property height

Number of rows in the table

property shape

Shape of the table

sum(axis=None)

Return sum of all elements (axis =0), rows in columns (axis =1), columns in rows (axis =2)

to_list()

Return BinTable data as a list of list

property width

Number of columns in the table