oalib module

Python Orthogonal Array Interface

oalib.A3A4(array_link al) mvalue_t_long

calculate A3 and A4 value for array

Parameters

al (*) – Array for which to calculate A3 and A4

Returns

Return type

Object with A3 and A4

oalib.ABINARY = 2

binary format

oalib.ABINARY_DIFF = 3

binary format storing differences of arrays

oalib.ABINARY_DIFFZERO = 4

binary format storing differences of arrays and zero offsets

oalib.ALATEX = 1

write arrays to a text file in a format that can be parsed by LaTeX

oalib.ATEXT = 0

text based format

oalib.A_AUTOMATIC = 6

automatically determine the format

oalib.A_AUTOMATIC_BINARY = 7

automatically determine the format (but binary)

oalib.Aefficiencies(array_link orthogonal_array, int verbose=0) doubleVector

calculate various A-efficiencies

oalib.Aefficiency(array_link orthogonal_array, int verbose=0) double

Calculate A-efficiency of matrix.

oalib.CL2discrepancy(array_link array) double

Calculate centered L2-discrepancy of a design

The method is from “A connection between uniformity and aberration in regular fractions of two-level factorials”, Fang and Mukerjee, 2000

oalib.CONFERENCE_ISOMORPHISM = 2

permute rows, columns and to row and column negations (values in 0, +1, -1)

oalib.COPY = 1

copy from array argument

class oalib.CandidateGeneratorBase(al, ct)

Bases: object

CandidateGeneratorBase(al, ct)

Class to generate candidate extensions with caching

We assume that the designs to be extended are run ordered, so that the caching has maximal effect.

The key idea used is that any valid extension of a design A with k columns is a permutation of a valid extension of the design B obtained by taking the first l < k columns of A. The permutations that are allowed are called the symmetry inflations. All the j2 checks performed for the extension of B do not have to be repeated for the permutations of this extension.

Constructors

  • CandidateGeneratorBase(al, ct)

\* `ct`

type of designs to generate

Type

conference_t

\* `verbose`

verbosity level

Type

int

\* `al`

last array analyzed

Type

array_link

\* `last_valid`

index of last valid column

Type

int

C++ includes
Type

conference.h

property al

last array analyzed

candidates(CandidateGeneratorBase self, int k) conference_columnVector

return all candidates for the kth column

property ct

type of designs to generate

property last_valid

index of last valid column

showCandidates(CandidateGeneratorBase self, int verbose=1)

Show the candidate extensions for each column

property thisown

The membership flag

property verbose

verbosity level

class oalib.CandidateGeneratorConference(al, ct)

Bases: CandidateGeneratorBase

CandidateGeneratorConference(al, ct)

Class to generate conference candidate extensions.

Constructors

  • CandidateGeneratorConference(al, ct)

C++ includes: conference.h

generateCandidates(CandidateGeneratorConference self, array_link al) conference_columnVector

Generate a list of candidate extensions for the specified design.

generateCandidatesZero(CandidateGeneratorConference self, array_link al, int kz) conference_columnVector

generate all candidate extensions with a zero at the specified position

property thisown

The membership flag

class oalib.CandidateGeneratorDouble(al, ct)

Bases: CandidateGeneratorBase

CandidateGeneratorDouble(al, ct)

Class to generate double conference candidate extensions with caching.

Constructors

  • CandidateGeneratorDouble(al, ct)

C++ includes: conference.h

generateCandidates(CandidateGeneratorDouble self, array_link al) conference_columnVector

Generate a list of candidate extensions for the specified design

This method uses symmetry inflation, assumes j1=0 and j2=0. Optimal performance is achieved when the arrays to be extended have identical first columns.

property thisown

The membership flag

class oalib.Combinations

Bases: object

C++ includes: mathtools.h

static initialize_number_combinations(int N)

initialize datastructure for number_combinations, this function is not thread safe

static number_combinations(int n, int k) long

Return number of combinations from previously calculated results

The results should be initialized with initialize_number_combinations

static number_combinations_max_n() int

return max number of N that can be calculated with number_combinations

property thisown

The membership flag

oalib.Cvalue2Dvalue(double Cvalue, int number_of_columns) double

convert C value to D-efficiency value

oalib.DAEefficiencyWithSVD(Eigen::MatrixXd const & secondorder_interaction_matrix, double & Deff, double & vif, double & Eeff, int & rank, int verbose)

Calculate D-efficiency and VIF-efficiency and E-efficiency values using SVD.

oalib.DOPTIM_AUTOMATIC = 3

automatically select one of the methods

oalib.DOPTIM_FLIP = 2

randomly flip an element between 0 and 1

oalib.DOPTIM_NONE = 4

perform no optimization

oalib.DOPTIM_SWAP = 1

swap two elements at random

oalib.DOPTIM_UPDATE = 0

replace a random element with a random value

class oalib.DconferenceFilter(_als, filter_symmetry, filterj2_, filterj3_=1)

Bases: object

DconferenceFilter(_als, filter_symmetry, filterj2_, filterj3_=1)

class to filter single or double conference designs

Constructors

  • DconferenceFilter(_als, filter_symmetry, filterj2_, filterj3_=1)

\* `als`
Type

array_link

\* `filtersymm`

filter based on symmetry

Type

int

\* `filterj2`

filter based on j2 value

Type

int

\* `filterj3`

filter based on j3 value

Type

int

\* `filterfirst`

filter only columns with first value >=0

Type

int

\* `filterzero`

filter based on first occurence of zero in a column

Type

int

\* `ngood`
Type

long

\* `inline_row`

row at which infile filtering is performed

Type

int

\* `sd`
Type

symmdata

C++ includes
Type

conference.h

property als

als : array_link

filter(DconferenceFilter self, charVector c) bool

return True if the extension satisfies all checks

filterJ(DconferenceFilter self, charVector column, int j2start=0) bool

return True if the extension satisfies all J-characteristic checks

filterJ2(DconferenceFilter self, charVector c) bool

return True of the candidate extension satisfies the J2 check

filterJ2last(DconferenceFilter self, charVector c) bool

return True of the candidate extension satisfies the J2 check for the last column of the array checked against

filterJ3(DconferenceFilter self, charVector column) bool

return True if the candidate satisfies the J3 check

filterJ3inline(DconferenceFilter self, charVector column) bool

return True if the candidate satisfies the J3 check

filterJ3s(DconferenceFilter self, charVector column, int idxstart) bool

return True if the candidate satisfies the J3 check for specified pairs

filterJlast(DconferenceFilter self, charVector c, int j2start=0) bool

return True if the extension satisfies all J-characteristic checks for the last columns

filterJpartial(DconferenceFilter self, charVector column, int maxrow) bool

Filter on partial column (only last col)

Parameters
  • column (*) – Extension column

  • maxrow (*) – the number of rows that are valid

filterList(DconferenceFilter self, conference_columnVector lst, int verbose=0) conference_columnVector

filter a list of columns using the filter method

filterListJ2last(DconferenceFilter self, conference_columnVector column_list) conference_columnVector
filterListZero(DconferenceFilter self, conference_columnVector lst) conference_columnVector

filter a list of cperms using the filterZero method

filterReason(DconferenceFilter self, charVector column) bool

return True if the extension satisfies all checks. prints the reason for returning True or False to stdout

filterSymmetry(DconferenceFilter self, charVector column) bool

return True of the candidate satisfies the symmetry check

filterZero(DconferenceFilter self, charVector c) bool

return True of the candidate extension satisfies the zero check

This means that the first entries of the extension do not contain a zero.

property filterfirst

filter only columns with first value >=0

property filterj2

filter based on j2 value

property filterj3

filter based on j3 value

property filtersymm

filter based on symmetry

property filterzero

filter based on first occurence of zero in a column

property inline_row

row at which infile filtering is performed

property ngood

ngood : long

property sd

sd : symmdata

show(DconferenceFilter self)

print object to stdout

property thisown

The membership flag

oalib.Defficiencies(array_link array, arraydata_t arrayclass, int verbose=0, int addDs0=0) doubleVector

Calculate efficiencies for an array

Parameters
  • array (*) – Array to use in calculation

  • arrayclass (*) – Specification of the array class

  • verbose (*) – Verbosity level

  • addDs0 (*) – If True, then add the Ds0-efficiency to the output

Returns

  • Vector with the calculate D-efficiency, the main effect robustness (or Ds-

  • optimality) and D1-efficiency for an orthogonal array

oalib.Defficiency(array_link orthogonal_array, int verbose=0) double

Calculate D-efficiency for a 2-level array using symmetric eigenvalue decomposition.

class oalib.DequeParetoElementLong(*args)

Bases: object

Proxy of C++ std::deque< pareto_element< mvalue_t< long >,long > > class.

append(DequeParetoElementLong self, ParetoElementLong x)
assign(DequeParetoElementLong self, std::deque< pareto_element< mvalue_t< long >, long > >::size_type n, ParetoElementLong x)
back(DequeParetoElementLong self) ParetoElementLong
begin(DequeParetoElementLong self) std::deque< pareto_element< mvalue_t< long >,long > >::iterator
clear(DequeParetoElementLong self)
empty(DequeParetoElementLong self) bool
end(DequeParetoElementLong self) std::deque< pareto_element< mvalue_t< long >,long > >::iterator
erase(DequeParetoElementLong self, std::deque< pareto_element< mvalue_t< long >, long > >::iterator pos) std::deque< pareto_element< mvalue_t< long >,long > >::iterator
erase(DequeParetoElementLong self, std::deque< pareto_element< mvalue_t< long >, long > >::iterator first, std::deque< pareto_element< mvalue_t< long >, long > >::iterator last) std::deque< pareto_element< mvalue_t< long >,long > >::iterator
front(DequeParetoElementLong self) ParetoElementLong
get_allocator(DequeParetoElementLong self) std::deque< pareto_element< mvalue_t< long >,long > >::allocator_type
insert(DequeParetoElementLong self, std::deque< pareto_element< mvalue_t< long >, long > >::iterator pos, ParetoElementLong x) std::deque< pareto_element< mvalue_t< long >,long > >::iterator
insert(DequeParetoElementLong self, std::deque< pareto_element< mvalue_t< long >, long > >::iterator pos, std::deque< pareto_element< mvalue_t< long >, long > >::size_type n, ParetoElementLong x) None
iterator(DequeParetoElementLong self) SwigPyIterator
pop(DequeParetoElementLong self) ParetoElementLong
pop_back(DequeParetoElementLong self)
pop_front(DequeParetoElementLong self)
push_back(DequeParetoElementLong self, ParetoElementLong x)
push_front(DequeParetoElementLong self, ParetoElementLong x)
rbegin(DequeParetoElementLong self) std::deque< pareto_element< mvalue_t< long >,long > >::reverse_iterator
rend(DequeParetoElementLong self) std::deque< pareto_element< mvalue_t< long >,long > >::reverse_iterator
resize(DequeParetoElementLong self, std::deque< pareto_element< mvalue_t< long >, long > >::size_type new_size)
resize(DequeParetoElementLong self, std::deque< pareto_element< mvalue_t< long >, long > >::size_type new_size, ParetoElementLong x) None
size(DequeParetoElementLong self) std::deque< pareto_element< mvalue_t< long >,long > >::size_type
swap(DequeParetoElementLong self, DequeParetoElementLong v)
property thisown

The membership flag

class oalib.DoptimReturn

Bases: object

Structure containing results of the Doptimize function

\* `dds`

calculated efficiencies for the generated designs

Type

std::vector< std::vector< double > >

\* `designs`

designs generated

Type

arraylist_t

\* `nrestarts`

number of restarts performed

Type

int

\* `_nimproved`
Type

int

C++ includes
Type

Deff.h

property dds

calculated efficiencies for the generated designs

property designs

designs generated

property nrestarts

number of restarts performed

property thisown

The membership flag

oalib.Doptimize(arraydata_t arrayclass, int nrestarts, doubleVector alpha, int verbose, coordinate_exchange_method_t method=DOPTIM_AUTOMATIC, int niter=300000, double maxtime=100000, int nabort=5000) DoptimReturn

Generates optimal designs for the specified class of designs

The method uses a coordinate-exchange algorithm to optimze a target function defined by the optimziation paramaters. The optimization is performed multiple times to prevent finding a design in a local minmum of the target function.

The method is described in more detail in “Two-Level Designs to Estimate All Main Effects and Two-Factor Interactions”, Eendebak et al., 2015, Technometrics, https://doi.org/10.1080/00401706.2016.1142903.

Parameters
  • arrayclass (*) – Class of designs to optimize

  • nrestarts (*) – Number of restarts to perform

  • alpha (*) – Optimization parameters. The target function is alpha_1 D + alpha_2 D_s + alpha D_1

  • verbose (*) – Verbosity level

  • method (*) – Method for optimization algorithm

  • niter (*) – Maximum number of iterations for each restart

  • maxtime (*) – Maximum calculation time. If this time is exceeded, the function is aborted

  • nabort (*) – Maximum number of iterations when no improvement is found

Returns

Return type

A structure with the generated optimal designs

oalib.DoptimizeMixed(arraylist_t sols, arraydata_t arrayclass, doubleVector alpha, int verbose=1, int nabort=-1) DoptimReturn

Function to generate optimal designs with mixed optimization approach

This function is beta code. See Doptimize for detauls of the parameters.

oalib.Dvalue2Cvalue(double Defficiency, int number_of_columns) double

convert D-efficiency value to C value

oalib.Eefficiency(array_link orthogonal_array, int verbose=0) double

Calculate E-efficiency of matrix (1 over the VIF-efficiency)

oalib.F4(array_link al, int verbose=1) mvalue_t_long

calculate F4 value for 2-level array

oalib.GWLP(array_link array, int verbose=0, int truncate=1) doubleVector

Calculate GWLP (generalized wordlength pattern)

The method used for calculation is from Xu and Wu (2001), “Generalized minimum aberration for asymmetrical fractional factorial desings”. For non-symmetric arrays see “Algorithmic Construction of Efficient Fractional Factorial Designs With Large Run Sizes”, Xu, Technometrics, 2009.

Parameters
  • array (*) – Array to calculate the GWLP value for

  • verbose (*) – Verbosity level

  • truncate (*) – If True then round values near zero to solve double precision errors

Returns

  • Vector with calculated generalized wordlength pattern

  • A more detailed description of the generalized wordlength pattern can also be

  • found in the documentation at https (//oapackage.readthedocs.io/.)

oalib.GWLPmixed(array_link array, int verbose=0, int truncate=1) doubleVector

Calculate GWLP (generalized wordlength pattern) for mixed-level arrays.

The method used for calculation is from “Algorithmic Construction of Efficient Fractional Factorial Designs With Large Run Sizes”, Xu, Technometrics, 2009.

Parameters
  • array (*) – Array to calculate the GWLP value for

  • verbose (*) – Verbosity level

  • truncate (*) – If True then round values near zero to solve double precision errors

Returns

Return type

Vector with calculated generalized wordlength pattern

oalib.GWLPvalueVector

alias of vector_mvalue_t_double

oalib.INIT = 2

initialized by user

oalib.INITCOLUMN_J5 = 2

Initialize column with values based on J5 value

oalib.INITCOLUMN_PREVIOUS = 1

Initialize column with values of previous column

oalib.INITCOLUMN_ZERO = 0

Initialize column with zeros

oalib.ISOTOPY = 0

permute rows, columns and symbols

Type

isotopy

oalib.J5_45 = 1

Ordering based on J5 and the 5-tuple of J4 values. Also called the L5 ordering

oalib.J5_ORIGINAL = 0

Ordering based in J5 in succesive columns

oalib.Jcharacteristics(array_link array, int number_of_columns=4, int verbose=0) intVector

Calculate Jk-characteristics of a matrix

The calcualted Jk-values are signed.

Parameters
  • array (*) – Array to calculate Jk-characteristics for

  • number_of_columns (*) – Number of columns

  • verbose (*) – Verbosity level

Returns

Return type

Vector with calculated Jk-characteristics

oalib.Jcharacteristics_conference(array, number_of_columns, verbose=0)

Calculate Jk-characteristics for a conference design

Parameters
  • array (array_link) – Conference design

  • number_of_columns (int) – Specifies the number of columns to use

  • verbose (int, optional) – Verbosity level

Return type

std::vector< int,std::allocator< int > >

Returns

A vector of calculated inner products between all combinations of k columns.

class oalib.Jcounter(*args)

Bases: object

Jcounter() Jcounter(N, jj=5, k=-1)

object to hold counts of maximum J_k-values

Constructors

  • Jcounter()

  • Jcounter(N, jj=5, k=-1)

\* `N`

number of rows

Type

int

\* `jj`
Type

int

\* `fvals`
Type

std::vector< int >

\* `maxJcounts`
Type

std::map< jindex_t, long >

\* `dt`

time needed for calculation

Type

double

C++ includes
Type

evenodd.h

property N

number of rows

addArray(Jcounter self, array_link al, int verbose=0)

add single array to statistics object

addArrays(Jcounter self, arraylist_t arraylist, int verbose=0)

add list of arrays to object

property dt

time needed for calculation

property fvals

fvals : std::vector<(int,std::allocator<(int)>)>

getCount(Jcounter self, int k, int j) long
getTotals(Jcounter self) longVector
getTotalsJvalue(Jcounter self, int jval) longVector
hasColumn(Jcounter self, int col) bool

return true if specified column is in the data

isOpen(Jcounter self) bool
property jj

jj : int

maxCols(Jcounter self) int
property maxJcounts

maxJcounts : std::map<(jindex_t,long,std::less<(jindex_t)>,std::allocator<(std::pair<(q(const).jindex_t,long)>)>)>

narrays(Jcounter self) long
show(Jcounter self)

show statistics of the object

showPerformance(Jcounter self)
showcompact(Jcounter self)

show statistics of the object

property thisown

The membership flag

validData(Jcounter self) bool
oalib.LMC0check(array_link array, int verbose=0) lmc_t
oalib.LMC0checkDC(array_link al, int verbose=0) lmc_t
oalib.LMC_EQUAL = 1

Found a permutation which leads to a lexicographically equal array

oalib.LMC_LESS = 0

Found a permutation which leads to a lexicographically smaller array

oalib.LMC_MORE = 2

Found a permutation which leads to a lexicographically larger array

oalib.LMC_NONSENSE = 3

No valid result

oalib.LMCcheck(array_t const * array, arraydata_t ad, OAextend oaextend, LMCreduction_t reduction) lmc_t
oalib.LMCcheck(array_link array, arraydata_t ad, OAextend oaextend, LMCreduction_t reduction) lmc_t
oalib.LMCcheck(array_link array) lmc_t

Perform LMC check on an orthogonal array

Parameters

array (*) – Array to be checked for LMC minimal form

Returns

Return type

Result of the LMC check

oalib.LMCcheckLex(arraylist_t list, arraydata_t ad, int verbose=0) intVector
oalib.LMCcheckLex(array_link array, arraydata_t arrayclass) lmc_t

Perform minimal form check with LMC ordering.

oalib.LMCcheckOriginal(array_link array) lmc_t

Perform LMC check on a 2-level orthogonal array

The algorithm used is the original algorithm from “Complete enumeration of pure-level and mixed-level orthogonal arrays”, Schoen et al, 2009

Parameters

array (*) – Array to be checked for LMC minimal form

Returns

Return type

Result of the LMC check

oalib.LMCcheckj4(array_link array, arraydata_t arrayclass, LMCreduction_t reduction, OAextend oaextend, int jj=4) lmc_t

Perform minimal form check with J4 ordering.

oalib.LMCcheckj5(array_link array, arraydata_t arrayclass, LMCreduction_t reduction, OAextend oaextend) lmc_t

Perform minimal form check for J5 ordering.

class oalib.LMCreduction_helper_t

Bases: object

LMCreduction_helper_t()

Contains structures used by the LMC reduction or LMC check.

Part of the allocations is for structures that are constant and are re-used each time an LMC calculation is performed. Some other structures are temporary buffers that are written to all the time.

Constructors

  • LMCreduction_helper_t()

\* `LMC_non_root_init`
Type

int

\* `LMC_root_init`
Type

int

\* `LMC_reduce_root_rowperms_init`
Type

int

\* `ad`
Type

arraydata_t *

\* `LMC_root_rowperms_init`
Type

int

\* `nrootrowperms`

number of root row permutations

Type

int

\* `rootrowperms`

pointer to row permutations that leave the root unchanged

Type

rowperm_t *

\* `LMC_root_rowperms_init_full`
Type

int

\* `nrootrowperms_full`
Type

int

\* `rootrowperms_full`
Type

rowperm_t *

\* `colbuffer`
Type

array_t *

\* `dyndata_p`

buffer for a single column

Type

dyndata_t **

\* `colperm_p`

dynamic data; row permutations

Type

colindex_t **

\* `localcolperm_p`

column permutations

Type

colindex_t **

\* `current_trans`

local column permutation

Type

array_transformation_t *

C++ includes
Type

lmc.h

property LMC_non_root_init

LMC_non_root_init : int

property LMC_reduce_root_rowperms_init

LMC_reduce_root_rowperms_init : int

property LMC_root_init

LMC_root_init : int

property LMC_root_rowperms_init

LMC_root_rowperms_init : int

property LMC_root_rowperms_init_full

LMC_root_rowperms_init_full : int

property ad

ad : p.arraydata_t

property colbuffer

colbuffer : p.array_t

property colperm_p

dynamic data; row permutations

property current_trans

local column permutation

property dyndata_p

buffer for a single column

freeall(LMCreduction_helper_t self)
init(LMCreduction_helper_t self, arraydata_t adp)
init_nonroot_stage(LMCreduction_helper_t self, levelperm_t *& lperm_p, colperm_t *& colperm_p, colperm_t *& localcolperm_p, dyndata_t **& dynd_p, int & dynd_p_nelem, array_t *& colbuffer, arraydata_t adp)
init_root_stage(LMCreduction_helper_t self, levelperm_t *& lperm_p, colperm_t *& colperm_p, arraydata_t adp)
init_rootrowperms(LMCreduction_helper_t self, int & totalperms, rowperm_t *& rootrowperms, levelperm_t *& lperm_p)

Static initialization of root row permutations.

init_rootrowperms_full(LMCreduction_helper_t self, int & totalperms, rowperm_t *& rootrowperms, levelperm_t *& lperm_p)

Static initialization of root row permutations (full group)

property localcolperm_p

column permutations

needUpdate(LMCreduction_helper_t self, arraydata_t adp) int
property nrootrowperms

number of root row permutations

property nrootrowperms_full

nrootrowperms_full : int

property rootrowperms

pointer to row permutations that leave the root unchanged

property rootrowperms_full

rootrowperms_full : p.rowperm_t

show(LMCreduction_helper_t self, int verbose=1)
property thisown

The membership flag

update(LMCreduction_helper_t self, arraydata_t adp) int

update structure with new design specification

class oalib.LMCreduction_t(*args)

Bases: object

LMCreduction_t(at) LMCreduction_t(arrayclass)

Class to describe an LMC reduction.

The most important variable is the transformation itself, contained in transformation. The state contains information about how the reduction was performed.

Constructors

  • LMCreduction_t(at)

  • LMCreduction_t(arrayclass)

    copy constructor

\* `array`
Type

array_t *

\* `transformation`

pointer to transformation_t structure

Type

array_transformation_t *

\* `mode`
Type

OA_MODE

\* `state`
Type

REDUCTION_STATE

\* `init_state`
Type

INIT_STATE

\* `maxdepth`

maximum depth for search tree

Type

int

\* `lastcol`

last column visited in algorithm

Type

int

\* `nred`

counter for number of reductions made

Type

long

\* `targetcol`
Type

int

\* `mincol`
Type

int

\* `nrows`
Type

int

\* `ncols`
Type

int

\* `staticdata`
Type

LMCreduction_helper_t *

\* `sd`
Type

symmdataPointer

C++ includes
Type

lmc.h

property array

array : p.array_t

getArray(LMCreduction_t self) array_link

Assignment operator.

getReferenceReductionHelper(LMCreduction_t self) LMCreduction_helper_t

return a reference to a object with LMC reduction data

initStatic(LMCreduction_t self)

acquire a reference to a LMCreduction_helper_t object

property init_state

init_state : INIT_STATE

property lastcol

last column visited in algorithm

property maxdepth

maximum depth for search tree

property mincol

mincol : int

property mode

mode : OA_MODE

property ncols

ncols : int

property nred

counter for number of reductions made

property nrows

nrows : int

releaseStatic(LMCreduction_t self)

release internal LMCreduction_helper_t object

reset(LMCreduction_t self)

reset the reduction: clears the symmetries and sets the transformation to zero

property sd

sd : symmdataPointer

setArray(LMCreduction_t self, array_link al)
setArray(LMCreduction_t self, array_t const * array, int nrows, int ncols) None
show(LMCreduction_t self, int verbose=2)
property state

state : REDUCTION_STATE

property staticdata

staticdata : p.LMCreduction_helper_t

property targetcol

targetcol : int

property thisown

The membership flag

property transformation

pointer to transformation_t structure

updateFromLoop(LMCreduction_t self, arraydata_t ad, dyndata_t dynd, levelperm_t * lperms, array_t const * original)

called whenever we find a reduction

updateLastCol(LMCreduction_t self, int col)
updateSDpointer(LMCreduction_t self, array_link al, bool cache=False)

update the pointer to the symmetry data based on the specified array

updateTransformation(LMCreduction_t self, arraydata_t ad, dyndata_t dynd, levelperm_t * lperms, array_t const * original)
oalib.LMCreduction_train(array_link al, arraydata_t ad, LMCreduction_t reduction, OAextend oaextend) lmc_t

helper function for LMC reduction

oalib.MATRIX_ISOMORPHISM = 1

permute rows and columns

oalib.MODEL_CONSTANT = 0

only the intercept

oalib.MODEL_INTERACTION = 2

intercept, main effects and second order interactions

oalib.MODEL_INVALID = 4

invalid model

oalib.MODEL_MAIN = 1

intercept and main effects

oalib.MODEL_SECONDORDER = 3

intercept, main effects and second order effects(interactions and quadratic effects)

oalib.MODE_AUTOSELECT = 5

Automatically select the algorithm

oalib.MODE_J4 = 1

LMC minimal form with J4 method

oalib.MODE_J5ORDER = 2

J5 minimal form

oalib.MODE_J5ORDERX = 3

J5 minimal form

oalib.MODE_J5ORDER_2LEVEL = 9

J5 minimal form for 2-level arrays

oalib.MODE_LMC = 0

LMC minimal form

oalib.MODE_LMC_2LEVEL = 7

LMC minimal form, specialized for 2-level arrays

oalib.MODE_LMC_DEBUG = 8

debugging method

oalib.MODE_LMC_SYMMETRY = 6

debugging method

oalib.OA_ISOMORPHISM = 3

permutations of rows, columns and column symbol permutations

oalib.OA_REDUCE = 1

reduce to minimal form

oalib.OA_REDUCE_PARTIAL = 2

reduce to partial minimal form

oalib.OA_TEST = 0

test for minimal form

class oalib.OAextend(*args)

Bases: object

OAextend() OAextend(o) OAextend(arrayclass)

Options for the extend code.

class containing parameters of the extension and LMC algorithm

Constructors

  • OAextend()

    Options for the extension algorithm

  • OAextend(o)

    Options for the extension algorithm

  • OAextend(arrayclass)

    Options for the extension algorithm

    The algorithm is automatically determined from the specified arrayclass.

\* `singleExtendTime`

time before printing progress of single extension, [seconds]

Type

double

\* `nLMC`

number of arrays LMC tested before printing progress of single extension

Type

int

\* `checkarrays`

perform LMC test after generation of array

Type

int

\* `check_maximal`

if true then return at once if a single extension has been found

Type

int

\* `use_row_symmetry`

adds a symmetry check to the extension algorithm based in symmetry of row permutations

Type

int

\* `init_column_previous`

init column with previous column in extension (if in the same column group)

Type

int

\* `extendarraymode`

determines how the extension arrays are stored

Type

extendarray_mode_t

\* `storefile`
Type

arrayfile_t

\* `j5structure`
Type

j5structure_t

C++ includes
Type

extend.h

property check_maximal

if true then return at once if a single extension has been found

property checkarrays

perform LMC test after generation of array

extendarray_mode_t_APPENDEXTENSION = 0

append extension column to extension list

extendarray_mode_t_APPENDFULL = 1

append full array to extension list

extendarray_mode_t_NONE = 3

do not store generated extensions

extendarray_mode_t_STOREARRAY = 2

store extension to disk

property extendarraymode

determines how the extension arrays are stored

getAlgorithm(OAextend self) algorithm_t

Return algorithm used.

getAlgorithmName(OAextend self) std::string

Return algorithm used (as string)

static getPreferredAlgorithm(arraydata_t arrayclass, int verbose=0) algorithm_t

Return preferred extension algorithm

Parameters
  • arrayclass (*) – Class of designs to extend

  • verbose (*) – Verbosity level

Returns

Return type

Algorithm selected to be used for this class

info(OAextend self, int verbose=1)

print configuration to stdout

property init_column_previous

init column with previous column in extension (if in the same column group)

property j5structure

j5structure : j5structure_t

property nLMC

number of arrays LMC tested before printing progress of single extension

setAlgorithm(OAextend self, algorithm_t algorithm, arraydata_t ad=None)

Set the algorithm to use for LMC checks.

setAlgorithmAuto(OAextend self, arraydata_t ad=None)

Set the algorithm automatically.

property singleExtendTime

time before printing progress of single extension, [seconds]

property storefile

storefile : arrayfile::arrayfile_t

property thisown

The membership flag

updateArraydata(OAextend self, arraydata_t arrayclass=None)

update the options structuer with the specified class of designs

property use_row_symmetry

adds a symmetry check to the extension algorithm based in symmetry of row permutations

oalib.ORDER_J5 = 1

J5 based ordering

oalib.ORDER_LEX = 0

lexicograph minimal by columns ordering

oalib.PECsequence(array_link array, int verbose=0) doubleVector

Calculate the projection estimation capacity sequence for a design

Parameters
  • array (*) – Input array

  • verbose (*) – Verbosity level

Returns

  • Vector with the caculated PEC sequence

  • The PECk of a design is the fraction of estimable second-order models in k

  • factors. The vector (PEC1, PEC2, …, ) is called the projection estimation

  • capacity sequence. See “Ranking Non-regular Designs”, J.L. Loeppky, 2004.

oalib.PICsequence(array_link array, int verbose=0) doubleVector

Calculate the projection information capacity sequence for a design.

Parameters
  • array (*) – Input array

  • verbose (*) – Verbosity level

Returns

  • Vector with the caculated PIC sequence

  • The PICk of a design is the average D-efficiency of estimable second-order

  • models in k factors. The vector (PIC1, PIC2, …, ) is called the PIC sequence.

class oalib.ParetoDoubleLong

Bases: object

Class to the calculate Pareto optimal elements.

The class is templated by the type of values to be compared and an index type. The index type is used to index the elements.

For elements added to the Pareto structure larger is better.

\* `verbose`

Verbosity level.

Type

int

\* `elements`

contains a list of all Pareto optimal elements

Type

std::deque< pareto_element< ValueType, IndexType > >

C++ includes
Type

pareto.h

addvalue(ParetoDoubleLong self, doubleVector value, long const idx) bool

add a new element

allindices(ParetoDoubleLong self) longVector

return all indices of the Pareto optimal elements

allindicesdeque(ParetoDoubleLong self) longDeque

return all indices of the Pareto optimal elements as a std::deque

allvalues(ParetoDoubleLong self) vector_vector_double

return the values of all Pareto optimal elements

property elements

contains a list of all Pareto optimal elements

number(ParetoDoubleLong self) int

return the total number of Pareto optimal values

numberindices(ParetoDoubleLong self) int

return the total number Pareto optimal objects

show(ParetoDoubleLong self, int verbose=1)

show the current set of Pareto optimal elements

static showvalue(doubleVector p)

show a Pareto element

property thisown

The membership flag

property verbose

Verbosity level

class oalib.ParetoElementLong

Bases: object

helper class for the Pareto class to hold elements

\* `value`
Type

pValue

\* `indices`
Type

std::vector< IndexType >

C++ includes
Type

pareto.h

dominates(ParetoElementLong self, vector_mvalue_t_long v) bool

return true of the argument element dominates this value

equal(ParetoElementLong self, vector_mvalue_t_long v) bool

return true of the argument element is equal to this element

property indices

indices : std::vector<(long,std::allocator<(long)>)>

isdominated(ParetoElementLong self, vector_mvalue_t_long v) bool

return true of the argument element is dominated by this value

property thisown

The membership flag

property value

value : pareto_element<(mvalue_t<(long)>,long)>::pValue

class oalib.ParetoLongLong

Bases: object

Class to the calculate Pareto optimal elements.

The class is templated by the type of values to be compared and an index type. The index type is used to index the elements.

For elements added to the Pareto structure larger is better.

\* `verbose`

Verbosity level.

Type

int

\* `elements`

contains a list of all Pareto optimal elements

Type

std::deque< pareto_element< ValueType, IndexType > >

C++ includes
Type

pareto.h

addvalue(ParetoLongLong self, longVector value, long const idx) bool

add a new element

allindices(ParetoLongLong self) longVector

return all indices of the Pareto optimal elements

allindicesdeque(ParetoLongLong self) longDeque

return all indices of the Pareto optimal elements as a std::deque

allvalues(ParetoLongLong self) std::vector< Pareto< long,long >::pValue,std::allocator< Pareto< long,long >::pValue > >

return the values of all Pareto optimal elements

property elements

contains a list of all Pareto optimal elements

number(ParetoLongLong self) int

return the total number of Pareto optimal values

numberindices(ParetoLongLong self) int

return the total number Pareto optimal objects

show(ParetoLongLong self, int verbose=1)

show the current set of Pareto optimal elements

static showvalue(longVector p)

show a Pareto element

property thisown

The membership flag

property verbose

Verbosity level

class oalib.ParetoMElementLong

Bases: object

helper class for the Pareto class to hold elements

\* `value`
Type

pValue

\* `indices`
Type

std::vector< IndexType >

C++ includes
Type

pareto.h

dominates(ParetoMElementLong self, vector_mvalue_t_long v) bool

return true of the argument element dominates this value

equal(ParetoMElementLong self, vector_mvalue_t_long v) bool

return true of the argument element is equal to this element

property indices

indices : std::vector<(long,std::allocator<(long)>)>

isdominated(ParetoMElementLong self, vector_mvalue_t_long v) bool

return true of the argument element is dominated by this value

property thisown

The membership flag

property value

value : pareto_element<(mvalue_t<(long)>,long)>::pValue

class oalib.ParetoMultiDoubleLong

Bases: object

Class to the calculate Pareto optimal elements.

The class is templated by the type of values to be compared and an index type. The index type is used to index the elements.

For elements added to the Pareto structure larger is better.

\* `verbose`

Verbosity level.

Type

int

\* `elements`

contains a list of all Pareto optimal elements

Type

std::deque< pareto_element< ValueType, IndexType > >

C++ includes
Type

pareto.h

addvalue(ParetoMultiDoubleLong self, vector_mvalue_t_double value, long const idx) bool

add a new element

allindices(ParetoMultiDoubleLong self) longVector

return all indices of the Pareto optimal elements

allindicesdeque(ParetoMultiDoubleLong self) longDeque

return all indices of the Pareto optimal elements as a std::deque

allvalues(ParetoMultiDoubleLong self) std::vector< Pareto< mvalue_t< double >,long >::pValue,std::allocator< Pareto< mvalue_t< double >,long >::pValue > >

return the values of all Pareto optimal elements

property elements

contains a list of all Pareto optimal elements

number(ParetoMultiDoubleLong self) int

return the total number of Pareto optimal values

numberindices(ParetoMultiDoubleLong self) int

return the total number Pareto optimal objects

show(ParetoMultiDoubleLong self, int verbose=1)

show the current set of Pareto optimal elements

static showvalue(vector_mvalue_t_double p)

show a Pareto element

property thisown

The membership flag

property verbose

Verbosity level

class oalib.ParetoMultiLongLong

Bases: object

Class to the calculate Pareto optimal elements.

The class is templated by the type of values to be compared and an index type. The index type is used to index the elements.

For elements added to the Pareto structure larger is better.

\* `verbose`

Verbosity level.

Type

int

\* `elements`

contains a list of all Pareto optimal elements

Type

std::deque< pareto_element< ValueType, IndexType > >

C++ includes
Type

pareto.h

addvalue(ParetoMultiLongLong self, vector_mvalue_t_long value, long const idx) bool

add a new element

allindices(ParetoMultiLongLong self) longVector

return all indices of the Pareto optimal elements

allindicesdeque(ParetoMultiLongLong self) longDeque

return all indices of the Pareto optimal elements as a std::deque

allvalues(ParetoMultiLongLong self) std::vector< Pareto< mvalue_t< long >,long >::pValue,std::allocator< Pareto< mvalue_t< long >,long >::pValue > >

return the values of all Pareto optimal elements

property elements

contains a list of all Pareto optimal elements

number(ParetoMultiLongLong self) int

return the total number of Pareto optimal values

numberindices(ParetoMultiLongLong self) int

return the total number Pareto optimal objects

show(ParetoMultiLongLong self, int verbose=1)

show the current set of Pareto optimal elements

static showvalue(vector_mvalue_t_long p)

show a Pareto element

property thisown

The membership flag

property verbose

Verbosity level

oalib.REDUCTION_CHANGED = 1

the reduction was changed

oalib.REDUCTION_INITIAL = 0

the reduction is equal to the initial

oalib.SETROOT = 3

set initial state to root array

class oalib.SwigPyIterator(*args, **kwargs)

Bases: object

advance(n)
copy()
decr(n=1)
distance(x)
equal(x)
incr(n=1)
next()
previous()
property thisown

The membership flag

value()
oalib.VIFefficiency(array_link orthogonal_array, int verbose=0) double

Calculate VIF-efficiency of matrix.

oalib.acquire_LMCreduction_object() LMCreduction_helper_t

return static structure from dynamic global pool, return with releaseGlobalStatic

oalib.addArraysToPareto(Pareto< mvalue_t< long >, array_link > & pset, pareto_cb paretofunction, arraylist_t arraylist, int jj, int verbose)
oalib.addArraysToPareto(Pareto< mvalue_t< long >, array_link > & pset, pareto_cb_cache paretofunction, arraylist_t arraylist, int jj, int verbose) None

add arrays to set of Pareto results

oalib.addConstant(lst, value)

add a constant value to all arrays in a list

oalib.algnames(algorithm_t m) std::string

return name of the algorithm

oalib.algorithm_t_list() std::string

Return string representation of available algorithm modes.

oalib.analyseArrays(arraylist, verbose, jj=4)

Analyse a list of arrays

oalib.appendArrays(arrays_to_append, dst)

Append set of arrays to existing list

oalib.append_arrayfile(filename, array)

Append a single array to an array file. creates a new file if no file exists

oalib.apply_hadamard(array_link al, colindex_t hcolumn)

Apply Hadamard transformation to orthogonal array.

oalib.array2eigenModelMatrix(array)

Convert 2-level array to second order interaction model matrix (intercept, main effects, interaction effects)

Parameters

array (array_link) – Design of which to calculate the model matrix

Return type

MatrixFloat

Returns

Eigen matrix with the model matrix

oalib.array2eigenModelMatrixMixed(array, verbose=1)

Create first and second order model matrix for mixed-level orthogonal array

Parameters
  • array (array_link) – Input array

  • verbose (int, optional) – Verbosity level

Return type

std::pair< MatrixFloat,MatrixFloat >

Returns

Pair with main effects and two-factor interaction model

For 2-level arrays a direct calculation is used. For mixel-level arrays Helmert contrasts are used.

oalib.array2eigenX1(array, intercept=1)

Convert 2-level array to main effects in Eigen format

Parameters
  • array (array_link) – Array to convert

  • intercept (int, optional) – If True, then include the intercept

Return type

MatrixFloat

Returns

The main effects model

oalib.array2eigenX2(array)

Convert 2-level array to second order interaction matrix in Eigen format

The intercept and main effects are not included.

Parameters

array (array_link) – Array to convert

Return type

MatrixFloat

Returns

The second order interaction model

oalib.array2graph(*args)

Overload 1: Convert orthogonal array to graph representation

The conversion method is as in Ryan and Bulutoglu. The resulting graph is bi-partite. The graph representation can be used for isomorphism testing.


Overload 2: Convert orthogonal array to graph representation

The conversion method is as in Ryan and Bulutoglu. The resulting graph is bi-partite. The graph representation can be used for isomorphism testing.

oalib.array2modelmatrix(array_link array, char const * mode, int verbose=0) Eigen::MatrixXd

Convert orthogonal array or conference design to model matrix

The model matrix consists of the intercept, main effects and (optionally) the interaction effects and quadratic effects. The order in the interaction effects is (c1, c2)=(0,0), (1,0), (2,0), (2,1), … with c2<c1 for columns c1, c2. The size of the model matrix calculated by this function is given by array2modelmatrix_sizes.

Parameters
  • array (*) – Orthogonal array or conference design

  • mode (*) – Type of model matrix to calculate. Can be ‘m’ for main effects, ‘i’ for interaction effects or ‘q’ for quadratic effects

  • verbose (*) – Verbosity level

Returns

  • Calculated model matrix

  • For conference designs the method conference_design2modelmatrix is used. For

  • orthogonal array the calculated is performed with array2eigenModelMatrixMixed.

oalib.array2modelmatrix_sizes(array_link array) intVector

Return the sizes of the model matrices calculated

Parameters

array (*) – Orthogonal array or conference designs

Returns

  • List with the sizes of the model matrix for (only intercept; intercept, main;)

  • intercept, main, and iteraction terms, intercept, main and full second order

oalib.array2rank_Deff_Beff(array_link al, doubleVector ret=None, int verbose=0) int

Calculate the rank of the second order interaction matrix of an orthogonal array

The model is the intercept, main effects and interaction effects The rank, D-efficiency, VIF-efficiency and E-efficiency are appended to the second argument

The return vector is filled with the rank, Defficiency, VIF efficiency and Eefficiency

oalib.array2secondorder(array_link array) array_link

Calculate second order interaction model for 2-level array

Parameters

array (*) – Array to calculate second order interaction model from

Returns

Return type

Array interaction effects

oalib.array2xf(array_link array) array_link

calculate second order interaction model for 2-level array

Parameters

array (*) – Array to calculate second order interaction model from

Returns

Return type

Array with intercept, main effects and interaction effects

oalib.array2xfeigen(array_link array) Eigen::MatrixXd

calculate second order interaction model for 2-level array

Parameters

array (*) – Array to calculate second order interaction model from

Returns

Return type

Array with intercept, main effects and interaction effects

oalib.arrayInFile(array, array_file, verbose=1)

return index of specified array in a file. returns -1 if array is not found

Parameters
  • array (array_link) – Array to find

  • array_file (string) – Location if file with arrays

  • verbose (int, optional) – Verbosity level

Return type

int

Returns

Position of array in list

oalib.arrayInList(array, arrays, verbose=1)

return index of specified array in a list. returns -1 if array is not found

Parameters
  • array (array_link) – Array to find

  • arrays (arraylist_t) – List of arrays

  • verbose (int, optional) – Verbosity level

Return type

int

Returns

Position of array in list

oalib.array_diff(A, B, r, c, rpos, cpos)

Compare 2 arrays and return position of first difference

Bases: object

array_link() array_link(nrows, ncols, index) array_link(nrows, ncols, index, data) array_link(arg1) array_link(eigen_matrix) array_link(array, column_permutation) array_link(array, nrows, ncols, index=0) array_link(array, nrows, ncolsorig, ncols, index) array_link(values, nrows, ncols, index=0)

Constructors

  • array_link()

    A class representing an integer valued array

  • array_link(nrows, ncols, index)

    A class representing an integer valued array

    The array is intialized with zeros.

    Parameters: * nrows :

    Number of rows

    • ncols :

      Number of columns

    • index :

      Number to keep track of lists of designs

  • array_link(nrows, ncols, index, data)

    A class representing an integer valued array

    Initialize with data from a pointer.

  • array_link(arg1)

    A class representing an integer valued array

    Initialize with data from another array_link object.

  • array_link(eigen_matrix)

    A class representing an integer valued array

    Initialize with data from an Eigen matrix.

  • array_link(array, column_permutation)

    A class representing an integer valued array

    The array is initialized by permuting the columns of another array

    Parameters: * array :

    Source to copy from

    • column_permutation :

      The permuntation to apply

  • array_link(array, nrows, ncols, index=0)

    A class representing an integer valued array

  • array_link(array, nrows, ncolsorig, ncols, index)

    A class representing an integer valued array

  • array_link(values, nrows, ncols, index=0)

    A class representing an integer valued array

    The array is initialized by copying the values from a vector.

\* `n_rows`

Number of rows in array.

Type

rowindex_t

\* `n_columns`

Number of columns in array.

Type

colindex_t

\* `index`

Index number.

Type

int

\* `array`

Pointer to array data.

Type

array_t *

\* `INDEX_NONE`
Type

const int

\* `INDEX_ERROR`
Type

const int

\* `INDEX_DEFAULT`
Type

const int

C++ includes
Type

arraytools.h

Aefficiency(array_link self) double

calculate A-efficiency

CL2discrepancy(array_link self) double

Calculate centered L2 discrepancy

The method is from “A connection between uniformity and aberration in regular fractions of two-level factorials”, Fang and Mukerjee, 2000

Defficiencies(array_link self, int verbose=0, int addDs0=0) doubleVector

calculate D-efficiency, calculate main effect robustness (or Ds-optimality) and D1-efficiency for an orthogonal array

Defficiency(array_link self) double

calculate D-efficiency

DsEfficiency(array_link self, int verbose=0) double

calculate main effect robustness (or Ds-optimality)

Eefficiency(array_link self) double

calculate E-efficiency

Fvalues(array_link self, int number_of_columns) intVector

Calculate F-values of a 2-level matrix.

This assumes the strength is at least 3. Otherwise use the jstruct_t object

FvaluesConference(array_link self, int number_of_columns) intVector

Calculate F-values of a conference design

Parameters

number_of_columns (*) – Number of columns to use

Returns

Return type

The Fk vector with k the number of columns specified

GWLP(array_link self, int truncate=1, int verbose=0) doubleVector

Calculate generalized wordlength pattern

See also: GWLP

INDEX_DEFAULT = 0
INDEX_ERROR = -1
INDEX_NONE = 0
Jcharacteristics(array_link self, int jj=4) intVector

Calculate the Jk-characteristics of the matrix (the values are signed)

Parameters

jj (*) – Number of columns to use

Returns

Return type

Vector with calculated Jk values

PECsequence(array_link self, int verbose=0) doubleVector

Calculate the projective estimation capacity sequence.

PICsequence(array_link self, int verbose=0) doubleVector

Calculate the projective information capacity sequence.

VIFefficiency(array_link self) double
property array

Pointer to array data

at(array_link self, rowindex_t const arg2, colindex_t const arg3) array_t
at(array_link self, int const index) array_t
at(array_link self, rowindex_t const arg2, colindex_t const arg3) array_t &

get element at specified position

atfast(array_link self, rowindex_t const r, colindex_t const c) array_t const
atfast(array_link self, rowindex_t const r, colindex_t const c) array_t &

get element from array, no error checking, inline version

clear(array_link self)

fill array with zeros

clone(array_link self) array_link
columnEqual(array_link self, int column_index, array_link rhs, int column_index_rhs) bool

return true if two columns are equal

columnGreater(array_link self, int c1, array_link rhs, int rhs_column) int

return true of specified column is smaller than column in another array

create_root(array_link self, arraydata_t arrayclass, int fill_value=0)

create root in arraylink

data(array_link self) void *
debug(array_link self)
deepcopy(array_link self, array_link rhs) array_link
deleteColumn(array_link self, int index) array_link

return array with selected column removed

equalsize(array_link self, array_link rhs) int

return true of two array have the same dimensions

firstColumnDifference(array_link self, array_link A) int

return index of first different column

firstDiff(array_link self, array_link A, int & r, int & c, int verbose=1) bool

Calculate row and column index of first difference between two arrays

The difference is according to the column-major ordering.

foldover(array_link self) bool

return true if the array is a foldover array

getEigenMatrix(array_link self) MatrixFloat

return the array as an Eigen matrix

getModelMatrix(array_link self, int order, int intercept=1, int verbose=0) MatrixFloat

Caculate model matrix of an orthogonal array

Parameters
  • order (*) – For 0 return only the intercept; for 1 return intercept and main effects; for 2 return intercept, main effects and interaction effects.

  • intercept (*) – If 1, then include the intercept in the output.

  • verbose (*) – Verbosity level

Returns

  • Calculated model matrix

  • This function uses array2eigenModelMatrixMixed for the calculation.

getarray(verbose=0, *args)

Return Numpy style array

getarraydata(array_link self, int * pymat1)
property index

Index number

init(array_link self, rowindex_t r, colindex_t c)
is2level(array_link self) bool

return true if the array is a 2-level array (e.g. only contains values 0 and 1)

isSymmetric(array_link self) bool

return true if the array is symmetric

is_conference(array_link self) bool
is_conference(array_link self, int number_of_zeros) bool

return true if the array is a +1, 0, -1 valued array, with specified number of zeros in each column

is_mixed_level(array_link self) bool

return true is the array is a mixel-level array

is_orthogonal_array(array_link self) bool

return true is the array is array with values in 0, 1, …, for each column

makeSymmetric(array_link self)

make the array symmetric by copying the upper-right to the lower-left

max(array_link self) array_t
md5(array_link self) std::string

return md5 sum of array representation (as represented with 32bit int datatype in memory)

min(array_link self) array_t
property n_columns

Number of columns in array

property n_rows

Number of rows in array

negateRow(array_link self, rowindex_t row)

multiply a row by -1

nonzero_fraction(array_link self) double

return fraction of nonzero elements in array

randomcolperm(array_link self) array_link

apply a random permutation of columns of an orthogonal array

randomperm(array_link self) array_link

apply a random permutation of rows, columns and levels of an orthogonal array

randomrowperm(array_link self) array_link

apply a random permutation of rows of an orthogonal array

rank(array_link self) int

calculate rank of array

reduceDOP(array_link self) array_link

return the delete-one-factor-projection form of the array

reduceLMC(array_link self) array_link

return the LMC form of the array

row_symmetry_group(array_link self) symmetry_group

return the row_symmetry group of an array

selectColumns(array_link self, intVector c) array_link
selectColumns(array_link self, int c) array_link

select single column from an array

selectFirstColumns(array_link self, int ncolumns) array_link

return array with first number_of_arrays columns selected

selectFirstRows(array_link self, int nrows) array_link

return array with first number_of_arrays rows

selectLastColumns(array_link self, int ncolumns) array_link

return array with last number_of_arrays columns selected

setColumn(array_link self, int c, intVector v)
setColumn(array_link self, int c, charVector v) None

set a column of the array to the given vector

setarray(X, verbose=0)

Update the array link object with a Numpy array

Parameters

X (numpy array) – array to be copied to the object

setarraydata(array_link self, intVector tmp, int n)

internal function

setcolumn(array_link self, int target_column, array_link source_array, int source_column=0)

set column to values

setconstant(array_link self, array_t value)

set all elements in the array to a value

setvalue(array_link self, int row, int col, int value)
setvalue(array_link self, int row, int col, double value) None

set value of an array

shallowcopy(array_link self, array_link rhs) array_link
property shape
show(array_link self)

print information about array

showarray()

Show array

showarrayString(array_link self) std::string

print array to string

showarraycompact(array_link self)

print array to stdout in compact format (no whitespace between elemenents)

showproperties(array_link self)

print array properties to stdout

showstr(array_link self) std::string

return string describing the array

property size
strength(array_link self) int

calculate strength of an array

property thisown

The membership flag

transposed(array_link self) array_link

return transposed array

class oalib.array_transformation_t(*args)

Bases: object

array_transformation_t(arrayclass) array_transformation_t(arrayclass) array_transformation_t() array_transformation_t(transformation)

Contains a transformation of an array.

Contains an array transformation. The transformation consists of column, row and level permutations. The level and column permutations are not commutative (since the level permutations are tied to a particular column). We apply the column permutations first.

Constructors

  • array_transformation_t(arrayclass)

  • array_transformation_t(arrayclass)

  • array_transformation_t()

  • array_transformation_t(transformation)

    copy constructor

\* `rperm`

row permutation

Type

rowperm_t

\* `cperm`

column permutation

Type

colperm_t

\* `lperms`

level permutations

Type

levelperm_t *

\* `ad`

type of array

Type

const arraydata_t *

C++ includes
Type

arraytools.h

property ad

type of array

apply(array_transformation_t self, array_link array) array_link
apply(array_transformation_t self, array_t * sourcetarget) None
apply(array_transformation_t self, array_t const * source, array_t * target) None

apply transformation to an array

colperm(array_transformation_t self) intVector

return the column permutation of the transformation

property cperm

column permutation

inverse(array_transformation_t self) array_transformation_t

return the inverse transformation

isIdentity(array_transformation_t self) bool

return true if the transformation is equal to the identity

property lperms

level permutations

lvlperm(array_transformation_t self, int c) intVector

return the level permutations of the transformation

print_transformed(array_transformation_t self, carray_t * source)

apply transformation and show resulting array

randomize(array_transformation_t self)

initialize to a random transformation

randomizecolperm(array_transformation_t self)

initialize with a random column permutation

randomizerowperm(array_transformation_t self)

initialize with a random row permutation

reset(array_transformation_t self)

return the transformation to the identity transformation

rowperm(array_transformation_t self) intVector

return the row permutation of the transformation

property rperm

row permutation

setcolperm(array_transformation_t self, intVector column_permutation)

set the column permutation of the transformation

setlevelperm(array_transformation_t self, int column_index, intVector lvl_permutation)

set the level permutation of the transformation

setrowperm(array_transformation_t self, intVector row_permutation)

set the row permutation of the transformation

show(array_transformation_t self)
show(array_transformation_t self, std::ostream & out) None
property thisown

The membership flag

class oalib.arraydata_t(*args)

Bases: object

arraydata_t() arraydata_t(s, N, strength, ncols) arraydata_t(s, N, strength, ncols) arraydata_t(s_, N, strength, ncols) arraydata_t(adp) arraydata_t(adp, newncols)

Specifies a class of arrays.

The specification includes the number of rows, number of columns, factor levels and strength.

Constructors

  • arraydata_t()

    Specifies a class of orthogonal arrays

    The specification includes the number of rows, number of columns, factor levels and strength.

    An orthogonal array of strength t, N runs, k factors (columns) and factor levels s[i] is an N times k array with symbols 0, 1, …, s[i]-1 in column i such that for every t columns every t-tuple of elements occurs equally often.

  • arraydata_t(s, N, strength, ncols)

    Specifies a class of orthogonal arrays

    The specification includes the number of rows, number of columns, factor levels and strength.

    An orthogonal array of strength t, N runs, k factors (columns) and factor levels s[i] is an N times k array with symbols 0, 1, …, s[i]-1 in column i such that for every t columns every t-tuple of elements occurs equally often.

    Parameters: * s :

    Factor levels

    • N :

      Number of rows

    • strength :

      Strength for class

    • ncols :

      Number of columns for the class

  • arraydata_t(s, N, strength, ncols)

    Specifies a class of orthogonal arrays

    The specification includes the number of rows, number of columns, factor levels and strength.

    An orthogonal array of strength t, N runs, k factors (columns) and factor levels s[i] is an N times k array with symbols 0, 1, …, s[i]-1 in column i such that for every t columns every t-tuple of elements occurs equally often.

    Parameters: * s :

    Factor levels

    • N :

      Number of rows

    • strength :

      Strength for class

    • ncols :

      Number of columns for the class

  • arraydata_t(s_, N, strength, ncols)

    Specifies a class of orthogonal arrays

    The specification includes the number of rows, number of columns, factor levels and strength.

    An orthogonal array of strength t, N runs, k factors (columns) and factor levels s[i] is an N times k array with symbols 0, 1, …, s[i]-1 in column i such that for every t columns every t-tuple of elements occurs equally often.

  • arraydata_t(adp)

    Specifies a class of orthogonal arrays

    The specification includes the number of rows, number of columns, factor levels and strength.

    An orthogonal array of strength t, N runs, k factors (columns) and factor levels s[i] is an N times k array with symbols 0, 1, …, s[i]-1 in column i such that for every t columns every t-tuple of elements occurs equally often.

  • arraydata_t(adp, newncols)

    Specifies a class of orthogonal arrays

    The specification includes the number of rows, number of columns, factor levels and strength.

    An orthogonal array of strength t, N runs, k factors (columns) and factor levels s[i] is an N times k array with symbols 0, 1, …, s[i]-1 in column i such that for every t columns every t-tuple of elements occurs equally often.

\* `N`

number of runs

Type

rowindex_t

\* `ncols`

total number of columns (factors) in the design

Type

colindex_t

\* `strength`

strength of the design

Type

colindex_t

\* `s`

pointer to factor levels of the array

Type

array_t *

\* `order`

Ordering used for arrays.

Type

ordering_t

\* `ncolgroups`

number of groups of columns with the same number of levels

Type

colindex_t

\* `colgroupindex`

specifies for each column the index of the column group

Type

colindex_t *

\* `colgroupsize`

specifies for each column the size of the column group

Type

colindex_t *

\* `oaindex`

index of the array

Type

int

C++ includes
Type

arraytools.h

property N

number of runs

calculate_oa_index(arraydata_t self, colindex_t strength)

calculate the index of the orthogonal arrays in this class

property colgroupindex

specifies for each column the index of the column group

property colgroupsize

specifies for each column the size of the column group

complete_arraydata(arraydata_t self)

Calculate derived data such as the index and column groups from a design.

complete_arraydata_fixlast(arraydata_t self)
complete_arraydata_splitn(arraydata_t self, int ns)
create_root(arraydata_t self, int n_columns=-1, int fill_value=0) array_link

return the root array for the class

factor_levels(arraydata_t self) intVector

return factor levels

factor_levels_column_groups()

return factor levels for the column groups

fullidstr(arraydata_t self, int series=0) std::string
getS(arraydata_t self) intVector

return factor levels

get_col_group(arraydata_t self, colindex_t const col) colindex_t

Return index of the column group for a column.

get_column_groups_sizes()

return sizes of the column groups

getfactorlevel(arraydata_t self, int idx) int

return the factor level for the specified column return -1 if the column index is invalid

idstr(arraydata_t self) std::string
idstrseriesfull(arraydata_t self) std::string
is2level(arraydata_t self) bool

return true if the class represents a 2-level array

is_factor_levels_sorted(arraydata_t self) bool

Return True if the factor levels are sorted from large to small.

ismixed(arraydata_t self) bool

return true if the class represents mixed-level arrays

latexstr(arraydata_t self, int cmd=0, int series=0) std::string

return latex string describing the class

lmc_overflow_check(arraydata_t self)

check whether the LMC calculation will overflow

property ncolgroups

number of groups of columns with the same number of levels

property ncols

total number of columns (factors) in the design

property oaindex

index of the array

property order

Ordering used for arrays

randomarray(arraydata_t self, int strength=0, int ncols=-1) array_link

return random array from the class. this operation is only valid for strength 0 or 1

reduceColumns(arraydata_t self, int k) arraydata_t
reset_strength(arraydata_t self, colindex_t strength)

Reset strength of arraydata.

Parameters

strength (*) – The strength to reset the structure to

property s

pointer to factor levels of the array

set_colgroups(arraydata_t self, intVector splits)
set_colgroups(arraydata_t self, symmetry_group sg) None

set column group equal to that of a symmetry group

show(arraydata_t self, int verbose=1)
show_colgroups(arraydata_t self)

show column groups in the array class

showstr(arraydata_t self) std::string
property strength

strength of the design

property thisown

The membership flag

writeConfigFile(arraydata_t self, char const * filename)

Write file with specification of orthognal array class.

Parameters

filename (*) – Filename to write to

class oalib.arrayfile_t(*args)

Bases: object

arrayfile_t() arrayfile_t(filename, verbose=1) arrayfile_t(filename, nrows, ncols, narrays=-1, mode=ATEXT, number_of_bits=8)

Structure for reading or writing a file with arrays.

The format of the file is determined by the arrayfilemode_t The format described in detail in the documentation of the OApackage https://oapackage.readthedocs.io/en/latest/.

Constructors

  • arrayfile_t()

    Structure for reading or writing a file with arrays

  • arrayfile_t(filename, verbose=1)

    Structure for reading or writing a file with arrays

    Parameters: * filename :

    File to open for reading

    • verbose :

      Verbosity level

  • `arrayfile_t(filename, nrows, ncols, narrays=-1, mode=ATEXT,

    number_of_bits=8)`

    Structure for reading or writing a file with arrays

    Open new array file for writing

    Parameters: * filename :

    File to open

    • nrows :

      Number of rows

    • ncols :

      Number of columns

    • narrays :

      Specify a number of arrays, or -1 to add dynamically

    • mode :

      File mode

    • number_of_bits :

      Number of bits to use for storage. For 2-level arrays only 1 bit is needed

\* `filename`

location of file on disk

Type

std::string

\* `iscompressed`

True of the file is compressed with gzip.

Type

int

\* `nrows`

number of rows of the arrays

Type

int

\* `ncols`

number of columns of the arrays

Type

int

\* `nbits`

number of bits used when storing an array

Type

int

\* `mode`

file mode, can be ATEXT or ABINARY, ABINARY_DIFF, ABINARY_DIFFZERO

Type

arrayfilemode_t

\* `rwmode`

file opened for reading or writing

Type

afilerw_t

\* `narrays`

number of arrays in the file

Type

int

\* `narraycounter`
Type

int

\* `nfid`
Type

FILE *

\* `gzfid`

pointer to compressed file

Type

int

\* `verbose`

verbosity level

Type

int

\* `NARRAYS_MAX`

maximum number of arrays in structure

Type

const int

C++ includes
Type

arraytools.h

NARRAYS_MAX = 2000000000

maximum number of arrays in structure

add_comment(arrayfile_t self, std::string const & comment)

Add a comment to an array file (only available in text mode)

append_array(arrayfile_t self, array_link a, int specialindex=-1)

append a single array to the file

append_arrays(arrayfile_t self, arraylist_t arrays, int startidx=-1) int

append list of arrays to the file

static arrayNbits(arraydata_t ad) int
static arrayNbits(array_link A) int

return number of bits necessary to store an array

closefile(arrayfile_t self)

close the array file

createfile(arrayfile_t self, std::string const filename, int nrows, int ncols, int narrays=-1, arrayfile::arrayfilemode_t m=ATEXT, int number_of_bits=8)

Open a new file for writing and (if opened) close the current file.

property filename

location of file on disk

finisharrayfile(arrayfile_t self)
flush(arrayfile_t self)

flush any open file pointer

getnbits(arrayfile_t self) int
property gzfid

pointer to compressed file

hasrandomaccess(arrayfile_t self) bool

return true of the file format has random access mode

isbinary(arrayfile_t self) bool

return true if the file has binary format

property iscompressed

True of the file is compressed with gzip

isopen(arrayfile_t self) int

return true if file is open

property mode

file mode, can be ATEXT or ABINARY, ABINARY_DIFF, ABINARY_DIFFZERO

property narraycounter

narraycounter : int

property narrays

number of arrays in the file

property nbits

number of bits used when storing an array

property ncols

number of columns of the arrays

property nfid

nfid : p.FILE

property nrows

number of rows of the arrays

static parseModeString(std::string const format) arrayfile::arrayfilemode_t

parse string to determine the file mode

pos(arrayfile_t self) size_t

return current position in file

read_array(arrayfile_t self, array_link a) int
read_array(arrayfile_t self, array_t * array, int const nrows, int const ncols) int

read array and return index

readarrays(arrayfile_t self, int nmax=NARRAYS_MAX, int verbose=1) arraylist_t

read set of array from the file

readnext(arrayfile_t self) array_link

read next array from the file

property rwmode

file opened for reading or writing

seek(arrayfile_t self, int pos) int

seek to specified array position

setVerbose(arrayfile_t self, int v)

set verbosity level

showstr(arrayfile_t self) std::string

return string describing the object

swigcheck(arrayfile_t self) int

return True if code is wrapped by SWIG

property thisown

The membership flag

updatenumbers(arrayfile_t self)
property verbose

verbosity level

oalib.arrayfileinfo(filename, number_of_arrays, number_of_rows, number_of_columns)

return information about file with arrays

Parameters
  • filename (string) – Filename of array file

  • number_of_arrays (int) – Variable is set with number of arrays

  • number_of_rows (int) – Variable is set with number of rows

  • number_of_columns (int) – Variable is set with number of columns

oalib.arraylink2arraydata(array, extracols=0, strength=2)

create arraydata_t structure from array

Parameters
  • array (array_link) – Array to use as input specifiction for array class

  • extracols (int, optional) – Number of extra columns to add to the number of columns of the array

  • strength (int, optional) – Strength to set in the array class. If -1, then use the strength of the array

oalib.arraylink2eigen(array_link array) Eigen::MatrixXd

convert array_link to Eigen matrix

class oalib.arraylist_t(*args)

Bases: object

Proxy of C++ std::deque< array_link > class.

append(arraylist_t self, array_link x)
assign(arraylist_t self, std::deque< array_link >::size_type n, array_link x)
back(arraylist_t self) array_link
begin(arraylist_t self) std::deque< array_link >::iterator
clear(arraylist_t self)
empty(arraylist_t self) bool
end(arraylist_t self) std::deque< array_link >::iterator
erase(arraylist_t self, std::deque< array_link >::iterator pos) std::deque< array_link >::iterator
erase(arraylist_t self, std::deque< array_link >::iterator first, std::deque< array_link >::iterator last) std::deque< array_link >::iterator
front(arraylist_t self) array_link
get_allocator(arraylist_t self) std::deque< array_link >::allocator_type
insert(arraylist_t self, std::deque< array_link >::iterator pos, array_link x) std::deque< array_link >::iterator
insert(arraylist_t self, std::deque< array_link >::iterator pos, std::deque< array_link >::size_type n, array_link x) None
iterator(arraylist_t self) SwigPyIterator
pop(arraylist_t self) array_link
pop_back(arraylist_t self)
pop_front(arraylist_t self)
push_back(arraylist_t self, array_link x)
push_front(arraylist_t self, array_link x)
rbegin(arraylist_t self) std::deque< array_link >::reverse_iterator
rend(arraylist_t self) std::deque< array_link >::reverse_iterator
resize(arraylist_t self, std::deque< array_link >::size_type new_size)
resize(arraylist_t self, std::deque< array_link >::size_type new_size, array_link x) None
size(arraylist_t self) std::deque< array_link >::size_type
swap(arraylist_t self, arraylist_t v)
property thisown

The membership flag

oalib.arrayrank(array_link array) int

calculate the rank of an array

oalib.arrayrankColPivQR(array_link al, double threshold=-1) int

return rank of an array based on Eigen::ColPivHouseholderQR

oalib.arrayrankFullPivLU(array_link al, double threshold=-1) int

return rank of an array based on Eigen::FullPivLU

oalib.arrayrankFullPivQR(array_link al, double threshold=-1) int

return rank of an array based on Eigen::FullPivHouseholderQR

oalib.arrayrankInfo(Eigen::MatrixXd const & arg1, int verbose=1) int
oalib.arrayrankInfo(array_link array, int verbose=1) int

Return rank of an array. Information about the different methods for rank calculation is printed to stdout.

oalib.arrayrankSVD(array_link al, double threshold=-1) int

return rank of an array based on Eigen::JacobiSVD

class oalib.arraywriter_t

Bases: object

arraywriter_t()

structure to write arrays to disk, thread safe

Constructors

  • arraywriter_t()

\* `afiles`

Pointers to different data files.

Since depth_extend is a depth first approach we need to store arrays with a different number of columns

Type

std::vector< arrayfile_t * >

\* `writearrays`

only write arrays if this variable is true

Type

bool

\* `nwritten`

number of arrays written to disk

Type

int

\* `verbose`

verbosity level

Type

int

C++ includes
Type

arraytools.h

property afiles

Pointers to different data files.

Since depth_extend is a depth first approach we need to store arrays with a different number of columns

closeafiles(arraywriter_t self)
flush(arraywriter_t self)

flush all output files

initArrayFiles(arraywriter_t self, arraydata_t ad, int kstart, std::string const prefix, arrayfile::arrayfilemode_t mode=ABINARY_DIFF)

initialize the result files

nArraysWritten(arraywriter_t self) int

return the total number arrays written to disk

property nwritten

number of arrays written to disk

property thisown

The membership flag

property verbose

verbosity level

writeArray(arraywriter_t self, array_link A)
writeArray(arraywriter_t self, arraylist_t lst) None

write a list of arrays to disk

property writearrays

only write arrays if this variable is true

oalib.calculateArrayParetoJ5(array_link al, int verbose) Pareto< mvalue_t< long >,array_link >::pValue

Calculate Pareto element with J5 criterium.

oalib.calculateArrayParetoJ5int(array_link al, int verbose) Pareto< mvalue_t< long >,int >::pValue

Calculate Pareto element with J5 criterium.

oalib.calculateArrayParetoJ5long(array_link al, int verbose) vector_mvalue_t_long

Calculate Pareto element with J5 criterium.

oalib.calculateJstatistics(char const * afile, int jj=5, int verbose=1) Jcounter

calculate J-value statistics

oalib.calculateParetoEvenOdd(stringVector infiles, char const * outfile, int verbose=1, arrayfile::arrayfilemode_t afmode=ABINARY, int nrows=-1, int ncols=-1, paretomethod_t paretomethod=PARETOFUNCTION_DEFAULT)

Calculate the Pareto optimal arrays from a list of array files

Pareto optimality is calculated according to (rank; A3,A4; F4)

class oalib.charVector(*args)

Bases: object

Proxy of C++ std::vector< signed char > class.

append(charVector self, std::vector< signed char >::value_type const & x)
assign(charVector self, std::vector< signed char >::size_type n, std::vector< signed char >::value_type const & x)
back(charVector self) std::vector< signed char >::value_type const &
begin(charVector self) std::vector< signed char >::iterator
capacity(charVector self) std::vector< signed char >::size_type
clear(charVector self)
empty(charVector self) bool
end(charVector self) std::vector< signed char >::iterator
erase(charVector self, std::vector< signed char >::iterator pos) std::vector< signed char >::iterator
erase(charVector self, std::vector< signed char >::iterator first, std::vector< signed char >::iterator last) std::vector< signed char >::iterator
front(charVector self) std::vector< signed char >::value_type const &
get_allocator(charVector self) std::vector< signed char >::allocator_type
insert(charVector self, std::vector< signed char >::iterator pos, std::vector< signed char >::value_type const & x) std::vector< signed char >::iterator
insert(charVector self, std::vector< signed char >::iterator pos, std::vector< signed char >::size_type n, std::vector< signed char >::value_type const & x) None
iterator(charVector self) SwigPyIterator
pop(charVector self) std::vector< signed char >::value_type
pop_back(charVector self)
push_back(charVector self, std::vector< signed char >::value_type const & x)
rbegin(charVector self) std::vector< signed char >::reverse_iterator
rend(charVector self) std::vector< signed char >::reverse_iterator
reserve(charVector self, std::vector< signed char >::size_type n)
resize(charVector self, std::vector< signed char >::size_type new_size)
resize(charVector self, std::vector< signed char >::size_type new_size, std::vector< signed char >::value_type const & x) None
size(charVector self) std::vector< signed char >::size_type
swap(charVector self, charVector v)
property thisown

The membership flag

oalib.checkConferenceComposition(array_link al, int verbose=0) int
oalib.checkConferenceInverse(array_link array) int
oalib.checkTransformationComposition(array_link al, int verbose=0) int
oalib.checkTransformationInverse(array_link al) int
oalib.checkloglevel(int level) bool

return True if the current logging level is smaller or equal than the specified level

oalib.choose_long(n, k)

Calculate binomial

Calculates n!/(k! * (n-k)!)

A recursive formala is used to prevent overflows.

The number of combinations is calculated using the an addapted formula Calculates number of combinations :type n: int :param n: Total number of entries to choose from :type k: int :param k: Number of entries in a certain combination :rtype: int :return: Binomal n, k

oalib.clear_LMCreduction_pool()

release all objects in the pool

oalib.clone_array(array, nrows, ncols)

Clone an array

oalib.compareJ54(array_link lhs, array_link rhs) int

Return -1 if the first array is smaller in J54 ordering than the second array, 0 if equal and 1 otherwise

oalib.compareLMC(lhs, rhs)

Return -1 if the first array is smaller in LMC ordering than the second array, 0 if equal and 1 otherwise *

oalib.compareLMC0(array_link array_first, array_link array_second) bool

Return true if the first array is smaller in LMC-0 ordering than the second array

oalib.compile_information() std::string

Print the compile-time options to string.

Returns

Return type

String with compile time information

oalib.conditionNumber(array_link matrix) double

return the condition number of a matrix

oalib.conference2DSD(array_link conference_design, bool add_zeros=True) array_link

Convert conference design to definitive screening design

The DSD is created by appending the negated design to the conference design and then appending a row of zeros.

Parameters
  • conference_design (*) – Array with the conference design

  • add_zeros (*) – If True, then append a row of zeros

Returns

Return type

The DSD generated from the conference design

class oalib.conference_columnVector(*args)

Bases: object

Proxy of C++ std::vector< conference_column > class.

append(conference_columnVector self, charVector x)
assign(conference_columnVector self, std::vector< std::vector< signed char, std::allocator< signed char > > >::size_type n, charVector x)
back(conference_columnVector self) charVector
begin(conference_columnVector self) std::vector< std::vector< signed char,std::allocator< signed char > > >::iterator
capacity(conference_columnVector self) std::vector< std::vector< signed char,std::allocator< signed char > > >::size_type
clear(conference_columnVector self)
empty(conference_columnVector self) bool
end(conference_columnVector self) std::vector< std::vector< signed char,std::allocator< signed char > > >::iterator
erase(conference_columnVector self, std::vector< std::vector< signed char, std::allocator< signed char > > >::iterator pos) std::vector< std::vector< signed char,std::allocator< signed char > > >::iterator
erase(conference_columnVector self, std::vector< std::vector< signed char, std::allocator< signed char > > >::iterator first, std::vector< std::vector< signed char, std::allocator< signed char > > >::iterator last) std::vector< std::vector< signed char,std::allocator< signed char > > >::iterator
front(conference_columnVector self) charVector
get_allocator(conference_columnVector self) std::vector< std::vector< signed char,std::allocator< signed char > > >::allocator_type
insert(conference_columnVector self, std::vector< std::vector< signed char, std::allocator< signed char > > >::iterator pos, charVector x) std::vector< std::vector< signed char,std::allocator< signed char > > >::iterator
insert(conference_columnVector self, std::vector< std::vector< signed char, std::allocator< signed char > > >::iterator pos, std::vector< std::vector< signed char, std::allocator< signed char > > >::size_type n, charVector x) None
iterator(conference_columnVector self) SwigPyIterator
pop(conference_columnVector self) charVector
pop_back(conference_columnVector self)
push_back(conference_columnVector self, charVector x)
rbegin(conference_columnVector self) std::vector< std::vector< signed char,std::allocator< signed char > > >::reverse_iterator
rend(conference_columnVector self) std::vector< std::vector< signed char,std::allocator< signed char > > >::reverse_iterator
reserve(conference_columnVector self, std::vector< std::vector< signed char, std::allocator< signed char > > >::size_type n)
resize(conference_columnVector self, std::vector< std::vector< signed char, std::allocator< signed char > > >::size_type new_size)
resize(conference_columnVector self, std::vector< std::vector< signed char, std::allocator< signed char > > >::size_type new_size, charVector x) None
size(conference_columnVector self) std::vector< std::vector< signed char,std::allocator< signed char > > >::size_type
swap(conference_columnVector self, conference_columnVector v)
property thisown

The membership flag

oalib.conference_design2modelmatrix(array_link conference_design, char const * mode, int verbose=0) array_link

Calculate model matrix for a conference design

Parameters
  • conference_design (*) – Conference design

  • mode (*) – Can be ‘m’ for main effects, ‘i’ for interaction effects or ‘q’ for quadratic effects

  • verbose (*) – Verbosity level

Returns

Return type

Calculated model matrix

class oalib.conference_extend_t

Bases: object

Helper structure containing extensions of conference designs

\* `first`
Type

std::vector< conference_column >

\* `second`

list of first block candidate extensions

Type

std::vector< conference_column >

\* `extensions`

list of first block candidate extensions

Type

std::vector< conference_column >

C++ includes
Type

conference.h

combine(conference_extend_t self, int i, int j) charVector

list of candidate extensions

property extensions

list of first block candidate extensions

property first

first : std::vector<(conference_column,std::allocator<(conference_column)>)>

getarrays(conference_extend_t self, array_link al) arraylist_t

return the set of extension arrays

nExtensions(conference_extend_t self) size_t
property second

list of first block candidate extensions

property thisown

The membership flag

class oalib.conference_t(*args)

Bases: object

conference_t() conference_t(N, k, j1zero) conference_t(rhs)

Structure representing the type of conference designs.

Constructors

  • conference_t()

    Structure representing the type of conference designs

  • conference_t(N, k, j1zero)

    Structure representing the type of conference designs

    Parameters: * N :

    Number of rows

    • k :

      Number of columns

    • j1zero :

      If True then require the J1-characteristics to be zero

  • conference_t(rhs)

    Structure representing the type of conference designs

\* `N`

number of runs

Type

rowindex_t

\* `ncols`

total number of columns (factors) in the design

Type

colindex_t

\* `ctype`

defines the type of designs

Type

conference_type

\* `itype`

defines the isomorphism type

Type

matrix_isomorphism_t

\* `j1zero`

if true then J1 values should be zero

Type

bool

\* `j3zero`

if true then J3 values should be zero

Type

bool

C++ includes
Type

conference.h

CONFERENCE_DIAGONAL = 1

conference design with zeros only on diagonal

CONFERENCE_NORMAL = 0

normal conference design

DCONFERENCE = 2

double conference design

property N

number of runs

createDoubleConferenceRootArrays(conference_t self) arraylist_t

create the root arrays with 1 column for the double conference matrices

createRootArrays(conference_t self) arraylist_t

return the list of root arrays for the class of conference designs

create_root(conference_t self) array_link

create the unique representative of the 2 column conference design in LMC0 form

create_root_three_columns(conference_t self) array_link

create the unique representative of the 3 column conference design in LMC0 form

property ctype

defines the type of designs

idstr(conference_t self) std::string
property itype

defines the isomorphism type

property j1zero

if true then J1 values should be zero

property j3zero

if true then J3 values should be zero

property ncols

total number of columns (factors) in the design

property thisown

The membership flag

class oalib.conference_transformation_t(*args)

Bases: object

conference_transformation_t() conference_transformation_t(nrows, ncols) conference_transformation_t(al) conference_transformation_t(T)

Contains a transformation of a conference matrix.

Contains an array transformation. The transformation consists of column permutations, row permutations and sign switches for both the rows and columns.

The sign switches and the permutations are not commutative. We apply the permutations first and then the sign flips.

Constructors

  • conference_transformation_t()

  • conference_transformation_t(nrows, ncols)

    default constructor

  • conference_transformation_t(al)

  • conference_transformation_t(T)

\* `rperm`

row permutation of the transformation

Type

std::vector< int >

\* `cperm`

column permutation of the transformation

Type

std::vector< int >

\* `cswitch`

sign flips for the columns

Type

std::vector< int >

\* `rswitch`

sign flips for the rows

Type

std::vector< int >

\* `nrows`

number of rows

Type

int

\* `ncols`

number of columns

Type

int

C++ includes
Type

arraytools.h

apply(conference_transformation_t self, array_link al) array_link

apply transformation to an array_link object

property cperm

column permutation of the transformation

property cswitch

sign flips for the columns

inverse(conference_transformation_t self) conference_transformation_t

return the inverse transformation

isIdentity(conference_transformation_t self) bool

return true if the transformation is equal to the identity

property ncols

number of columns

property nrows

number of rows

randomize(conference_transformation_t self)

initialize to a random transformation

randomizecolflips(conference_transformation_t self)

initialize with random col switches

randomizecolperm(conference_transformation_t self)

initialize with a random column permutation

randomizerowflips(conference_transformation_t self)

initialize with random row switches

randomizerowperm(conference_transformation_t self)

initialize with a random row permutation

reset(conference_transformation_t self)

return the transformation to the identity transformation

property rperm

row permutation of the transformation

property rswitch

sign flips for the rows

setcolperm(conference_transformation_t self, intVector cp)
setrowperm(conference_transformation_t self, intVector rp)
show(conference_transformation_t self, int verbose=1)

show the array transformation

property thisown

The membership flag

oalib.convert_array_file(input_filename, output_filename, output_format, verbose=0)

Convert a file with arrays to a different format

oalib.copy_array(src, dst, nrows, ncols)

Make a copy of an array

class oalib.counter_t(n)

Bases: object

counter_t(n)

structure to count and show number of arrays generated, the structure is thread safe

Constructors

  • counter_t(n)

\* `nfound`
Type

std::vector< int >

C++ includes
Type

evenodd.h

addNfound(counter_t self, int col, int num)
addNumberFound(counter_t self, int n, int k)
addNumberFound(counter_t self, counter_t de) None
clearNumberFound(counter_t self)
nArrays(counter_t self) long
property nfound

nfound : std::vector<(int,std::allocator<(int)>)>

showcounts(counter_t self, arraydata_t ad)
showcounts(counter_t self, char const * str, int first, int last) None

show information about the number of arrays found

showcountscompact(counter_t self)

show information about the number of arrays found

property thisown

The membership flag

oalib.cprintf(int check, char const * message) int

conditional printf

oalib.create_array(*args)

Overload 1:

Create an array :type nrows: int :param nrows: Number of rows :type ncols: int :param ncols: Number of columns :rtype: int :return:


Overload 2:

Create an array from an arraydata_t structure

Create array_link from numpy array

oalib.create_root(*args)

Overload 1: set first columns of an array to root form


Overload 2: Creates the root of an orthogonal array. The root is appended to the list of arrays

oalib.currenttime() std::string

return the current time as a string

oalib.dcalc_mode_DCALC_ALWAYS = 0

always calculate efficiency

oalib.dcalc_mode_DCALC_COND = 1

only calculate efficiency for LMC_LESS

oalib.depth_extend_array(array_link al, depth_extend_t dextend, arraydata_t adfull, int verbose, depth_extensions_storage_t ds=None, int arg6=0)

depth extend a single array

oalib.depth_extend_direct(arraylist_t alist, depth_extend_t dextend, int extcol, OAextend oaextendx, int verbose)

variation of depth_extend for arrays with large symmetry groups

oalib.depth_extend_hybrid(arraylist_t alist, depth_extend_t dextend, int extcol, OAextend oaextendx, int verbose)

depth-first extension of arrays. depending on the symmetry group of the array to be extended a direct method is used or a method with caching of candidate columns

class oalib.depth_extend_sub_t(nn=0)

Bases: object

depth_extend_sub_t(nn=0)

Helper structure for dynamic extension

In this structure we keep track of pointers to valid column extensions

Constructors

  • depth_extend_sub_t(nn=0)

\* `lmctype`
Type

std::vector< int >

\* `lastcol`

last column changed in lmc check

Type

std::vector< int >

\* `strengthcheck`
Type

std::vector< double >

\* `valididx`
Type

std::vector< int >

\* `verbose`
Type

int

C++ includes
Type

evenodd.h

info(depth_extend_sub_t self)
initialize(depth_extend_sub_t self, arraylist_t alist, arraydata_t adf, OAextend oaextend) arraylist_t

initialize the new list of extension columns

property lastcol

last column changed in lmc check

property lmctype

lmctype : std::vector<(int,std::allocator<(int)>)>

n(depth_extend_sub_t self) size_t
resize(depth_extend_sub_t self, int nn)
selectArraysXX(depth_extend_sub_t self, array_link al, arraylist_t elist) arraylist_t
selectArraysZ(depth_extend_sub_t self, arraylist_t alist) arraylist_t

select the arrays with are LMC and hence need to be written to disk

property strengthcheck

strengthcheck : std::vector<(double,std::allocator<(double)>)>

property thisown

The membership flag

updateExtensionPointers(depth_extend_sub_t self, int extcol) intVector
property valididx

valididx : std::vector<(int,std::allocator<(int)>)>

property verbose

verbose : int

class oalib.depth_extend_t(*args)

Bases: object

depth_extend_t(ad_, _logtime=10000000, _discardJ5=-1) depth_extend_t(de)

Helper structure for dynamic extension.

This structure allows for writing the generated arrays to disk. It also contains functions to print progress of the extension.

Multiple copies of this class are made, but they all share the same counter_t and arraywriter_t object. Also t0 and tp are shared

Constructors

  • depth_extend_t(ad_, _logtime=10000000, _discardJ5=-1)

  • depth_extend_t(de)

\* `verbose`
Type

int

\* `oaextend`
Type

OAextend

\* `ad`
Type

const arraydata_t *

\* `loglevelcol`
Type

int

\* `logtime`

print progress every x seconds

Type

double

\* `extension_column_list`
Type

arraylist_t

\* `writearrays`

if set to true write arrays to disk

Type

int

\* `discardJ5`
Type

int

\* `discardJ5number`

if true, then we discard the designs which have J5 maximal

Type

long

\* `arraywriter`
Type

arraywriter_t *

\* `counter`
Type

counter_t *

\* `t0`
Type

double

\* `tp`
Type

double

C++ includes
Type

evenodd.h

property ad

ad : p.q(const).arraydata_t

property arraywriter

arraywriter : p.arraywriter_t

property counter

counter : p.counter_t

property discardJ5

discardJ5 : int

property discardJ5number

if true, then we discard the designs which have J5 maximal

property extension_column_list

extension_column_list : arraylist_t

info(depth_extend_t self)
property loglevelcol

loglevelcol : int

property logtime

print progress every x seconds

maxArrayCheck(depth_extend_t self)
property oaextend

oaextend : OAextend

setNarraysMax(depth_extend_t self, long n)
setposition(depth_extend_t self, int k, int c, int m, int extensioncols=-1, int goodextensioncols=-1)

set the position in the dextend structure

setpositionGEC(depth_extend_t self, int k, int goodextensioncols)

set the position in the dextend structure

show(depth_extend_t self)
showprogress(depth_extend_t self, int showtime=1, int depth=0, int forcelog=0) bool

show information about the progress of the loop

showsearchpath(depth_extend_t self, int depth)
property t0

t0 : double

property thisown

The membership flag

property tp

tp : double

property verbose

verbose : int

property writearrays

if set to true write arrays to disk

class oalib.depth_extensions_storage_t

Bases: object

Helper structure for the even-odd depth extension.

\* `columnextensionsList`
Type

std::vector< arraylist_t >

\* `goodarrayslist`
Type

std::vector< arraylist_t >

\* `depthalglist`
Type

std::vector< depth_alg_t >

\* `dextendsubList`
Type

std::vector< depth_extend_sub_t >

C++ includes
Type

evenodd.h

property columnextensionsList

columnextensionsList : std::vector<(arraylist_t,std::allocator<(arraylist_t)>)>

property depthalglist

depthalglist : std::vector<(depth_alg_t,std::allocator<(depth_alg_t)>)>

property dextendsubList

dextendsubList : std::vector<(depth_extend_sub_t,std::allocator<(depth_extend_sub_t)>)>

property goodarrayslist

goodarrayslist : std::vector<(arraylist_t,std::allocator<(arraylist_t)>)>

resize(depth_extensions_storage_t self, size_t s)
set(depth_extensions_storage_t self, int ai, arraylist_t goodarrays, arraylist_t extension_column_list, depth_alg_t depthalg, depth_extend_sub_t dextendsub)
property thisown

The membership flag

class oalib.depth_path_t

Bases: object

depth_path_t()

structure containing current position in search tree

Constructors

  • depth_path_t()

\* `ncurr`

vector with current position

Type

std::vector< int >

\* `nmax`

vector with target

Type

std::vector< int >

\* `necols`

number of extension columns

Type

std::vector< int >

\* `ngecols`

number of good extension columns

Type

std::vector< int >

\* `depthstart`
Type

int

C++ includes
Type

evenodd.h

property depthstart

depthstart : int

init(depth_path_t self, int ncols, int _depthstart=9)
property ncurr

vector with current position

property necols

number of extension columns

property ngecols

number of good extension columns

property nmax

vector with target

show(depth_path_t self, int depth, int maxentries=8)
property thisown

The membership flag

updatePosition(depth_path_t self, int k, int c, int m, int extensioncols, int goodextensioncols)
updatePositionGEC(depth_path_t self, int k, int goodextensioncols)
oalib.destroy_array(array)

Delete an array :type array: int :param array: :rtype: int :return:

class oalib.dextend_t

Bases: object

dextend_t()

Structure for dynamic extension of arrays based on D-efficiencies.

Constructors

  • dextend_t()

\* `NO_VALUE`
Type

const int

\* `lmctype`

results of minimal form calculations

Type

std::vector< lmc_t >

\* `lastcol`

last column changed in lmc check

Type

std::vector< int >

\* `Deff`

calculated efficiency values

Type

std::vector< double >

\* `filter`

indices of filtered arrays

Type

std::vector< int >

\* `filtermode`
Type

dfilter_t

\* `Dcheck`
Type

dcalc_mode

\* `directcheck`

perform immediate LMC check in extension

Type

int

\* `ntotal`

total number of arrays found

Type

long

\* `nlmc`

total number of arrays found in LMC form

Type

long

\* `n`

total number of arrays found passing all tests

Type

long

\* `DmaxDiscard`
Type

double

\* `nmaxrnktotal`
Type

long

C++ includes
Type

extend.h

property Dcheck

Dcheck : dcalc_mode

property Deff

calculated efficiency values

DefficiencyFilter(dextend_t self, double Dfinal, int k, int kfinal, double Lmax, int verbose=1)

perform filtering using D-efficiency

property DmaxDiscard

DmaxDiscard : double

NO_VALUE = 0
property directcheck

perform immediate LMC check in extension

property filter

indices of filtered arrays

filterArrays(dextend_t self, array_link al, arraylist_t earrays, arraylist_t earraysout, vector_vector_double edata, int verbose=1) intVector

filter the arrays based on values in filter

property filtermode

filtermode : dfilter_t

property lastcol

last column changed in lmc check

property lmctype

results of minimal form calculations

property n

total number of arrays found passing all tests

property nlmc

total number of arrays found in LMC form

property nmaxrnktotal

nmaxrnktotal : long

property ntotal

total number of arrays found

resize(dextend_t self, int nn)
property thisown

The membership flag

oalib.dfilter_t_DFILTER_BASIC = 1

filtering on D-efficiency

oalib.dfilter_t_DFILTER_MULTI = 2

filtering on D-efficiency with multi column prediction

oalib.dfilter_t_DFILTER_NONE = 0

no filtering on D-efficiency

oalib.distance_distribution(array_link array) doubleVector

Return the distance distribution of a design

The distance distribution is described in “Generalized minimum aberration for asymmetrical fractional factorial designs”, Wu and Xu, 2001

oalib.distance_distribution_mixed(array, verbose=0)

Return the distance distribution of a mixed-level design

The distance distribution is described in “Generalized minimum aberration for asymmetrical fractional factorial designs”, Wu and Xu, 2001. For mixed-level designs more details can be found in “A canonical form for non-regular arrays based on generalized wordlength pattern values of delete-one-factor projections”, Eendebak, 2014.

Parameters
  • al – Array for which to calculate the distribution

  • verbose (int, optional) – Verbosity level

Return type

ndarray< double >

Returns

Distance distribution

oalib.distance_distribution_mixed_inplace(array_link al, ndarray_double B, int verbose=0)
oalib.distance_distribution_shape(arrayclass)

Return shape of distance distribution for mixed level design

Parameters

arrayclass (arraydata_t) – Specification of the array class

Return type

std::vector< int,std::allocator< int > >

Returns

Shape of the distance distribution

class oalib.doubleVector(*args)

Bases: object

Proxy of C++ std::vector< double > class.

append(doubleVector self, std::vector< double >::value_type const & x)
assign(doubleVector self, std::vector< double >::size_type n, std::vector< double >::value_type const & x)
back(doubleVector self) std::vector< double >::value_type const &
begin(doubleVector self) std::vector< double >::iterator
capacity(doubleVector self) std::vector< double >::size_type
clear(doubleVector self)
empty(doubleVector self) bool
end(doubleVector self) std::vector< double >::iterator
erase(doubleVector self, std::vector< double >::iterator pos) std::vector< double >::iterator
erase(doubleVector self, std::vector< double >::iterator first, std::vector< double >::iterator last) std::vector< double >::iterator
front(doubleVector self) std::vector< double >::value_type const &
get_allocator(doubleVector self) std::vector< double >::allocator_type
insert(doubleVector self, std::vector< double >::iterator pos, std::vector< double >::value_type const & x) std::vector< double >::iterator
insert(doubleVector self, std::vector< double >::iterator pos, std::vector< double >::size_type n, std::vector< double >::value_type const & x) None
iterator(doubleVector self) SwigPyIterator
pop(doubleVector self) std::vector< double >::value_type
pop_back(doubleVector self)
push_back(doubleVector self, std::vector< double >::value_type const & x)
rbegin(doubleVector self) std::vector< double >::reverse_iterator
rend(doubleVector self) std::vector< double >::reverse_iterator
reserve(doubleVector self, std::vector< double >::size_type n)
resize(doubleVector self, std::vector< double >::size_type new_size)
resize(doubleVector self, std::vector< double >::size_type new_size, std::vector< double >::value_type const & x) None
size(doubleVector self) std::vector< double >::size_type
swap(doubleVector self, doubleVector v)
property thisown

The membership flag

oalib.double_conference_foldover_permutation(array_link double_conference) intVector

For a double conference design return a row permutation to a single conference design

If the design is not a foldover design then the first element of the returned permutation is -1.

Parameters

double_conference (*) – A double conference design

Returns

  • Permutation such that the top block of the resulting design forms a single

  • conference design

class oalib.dyndata_t(*args)

Bases: object

dyndata_t(N, col=0) dyndata_t(dd) dyndata_t(arg1)

Contains dynamic data of an array.

The dynamic data are used in the inner loops of the LMC algorithm. In particular they keep track of the current row ordering and column permutation. By not applying these transformations to the array we can save calculation time.

We try to prevent copying the object, so it is re-used at different levels in the algorithm.

  • N: static - col: changes at each column level

  • rowsort: changes at each column level, used mainly in non-root stage

  • colperm: changes at all levels

    See also: arraydata_t

Constructors

  • dyndata_t(N, col=0)

  • dyndata_t(dd)

  • dyndata_t(arg1)

\* `col`

active column

Type

colindex_t

\* `N`

number of rows

Type

rowindex_t

\* `rowsort`

ordering of rows

Type

rowsort_t *

\* `rowsortl`
Type

rowsortlight_t *

\* `colperm`

current column permutation

Type

colperm_t

C++ includes
Type

lmc.h

property N

number of rows

allocate_rowsortl(dyndata_t self)

allocate lightweight rowsort structure

property col

active column

property colperm

current column permutation

copydata(dyndata_t self, dyndata_t dd)
deleterowsortl(dyndata_t self)
getColperm(dyndata_t self) colpermtypelight
getColperm(dyndata_t self, colpermtypelight & cp) None

set column permutation

getRowperm(dyndata_t self, rowpermtypelight & rp)
getRowperm(dyndata_t self, rowperm_t & rperm) None
getRowperm(dyndata_t self) rowpermtypelight

return lightweight row permutation

initrowsortl(dyndata_t self)

initialize rowsortl from rowsort

reset(dyndata_t self)
property rowsort

ordering of rows

property rowsortl

rowsortl : p.rowsortlight_t

rowsortl2rowsort(dyndata_t self)

copy rowsortl variable to rowsrt

setColperm(dyndata_t self, colperm_t const perm, int n)
setColperm(dyndata_t self, larray< colindex_t > const & perm) None
setColperm(dyndata_t self, intVector perm) None
show(dyndata_t self)
property thisown

The membership flag

oalib.eigen2numpyHelper(double * pymat1, int n, MatrixFloat const & m)
oalib.eigenInfo(*args)

Print information about an Eigen matrix

Parameters
  • m (MatrixFloat) – Matrix about which to print information

  • str (string, optional) – String to prepend in output

  • verbose (int, optional) – Verbosity level

oalib.exampleArray(idx=0, verbose=0)

Return example array

Parameters
  • idx (int, optional) – Index of example array to return

  • verbose (int, optional) – If True, then print information about the array to stdout

oalib.extend_array(array_link array, arraydata_t array_class, OAextend oaextend) arraylist_t
oalib.extend_array(array_link array, arraydata_t arrayclass) arraylist_t
oalib.extend_array(array_link array, arraydata_t arrayclass, colindex_t const extension_column, arraylist_t extensions, OAextend oaextend) int

Extend an orthogonal array with a single column

See also: extend_array(const array_link &, arraydata_t &, OAextend const &)

Parameters
  • array (*) – Array to extend

  • arrayclass (*) – Array data for the full array

  • extension_column (*) – Column to extend

  • extensions (*) – List to which generated valid extensions are added

  • oaextend (*) – Structure with options

Returns

Return type

Number of candidate extensions generated

oalib.extend_arraylist(arraylist_t array_list, arraydata_t array_class, OAextend oaextend_options) arraylist_t
oalib.extend_arraylist(arraylist_t array_list, arraydata_t arrayclass) arraylist_t
oalib.extend_arraylist(arraylist_t array_list, arraydata_t array_class, OAextend oaextend_options, colindex_t extensioncol, arraylist_t extensions) int

Extend a list of orthogonal arrays

Parameters
  • array_list (*) – The list of arrays to be extended

  • array_class (*) – Class of arrays to generate

  • oaextend_options (*) – Parameters for the extension algorithm

  • extensioncol (*) – Index of column to be added to the designs

  • extensions (*) – List to append generated designs to

Returns

  • List of all generated arrays

  • See also (extend_array(const array_link &, arraydata_t &, OAextend const &))

Returns

Return type

Number of candidate arrays generated

oalib.extend_conference(arraylist_t lst, conference_t conference_type, int verbose, int select_isomorphism_classes=0) arraylist_t

Extend a list of conference designs with a single column.

The list of conference designs is extended by adding to each design the candidate extentions generated by CandidateGenerator.

Parameters
  • lst (*) – List of conference designs

  • conference_type (*) – Type specification for the conference designs

  • verbose (*) – Verbosity level

  • select_isomorphism_classes (*) – If True then select only a single design for each isomorphism class specified by the conference type.

Returns

  • List of generated conference designs

  • The extension algorithm tries to generate designs in LMC0 normal form and prunes

  • any designs that are not in LMC0 form.

oalib.extend_conference_matrix(array_link design, conference_t conference_type, int extcol, int verbose=1, int maxzpos=-1) conference_extend_t

Extend a single conference design with candidate columns

Parameters
  • design (*) – Conference design

  • conference_type (*) – Type specification for the conference designs

  • extcol (*) – Index of column to generate extensions for

  • verbose (*) – Verbosity level

  • maxzpos (*) – Maximum position of zero in specified design

Returns

Return type

Structure with information about the possible extensions

oalib.extend_conference_plain(arraylist_t lst, conference_t conference_type, int verbose, int select_isomorphism_classes=0) arraylist_t

Extend a list of conference designs with a single column, plain version without caching

Research function.

oalib.extend_conference_restricted(arraylist_t lst, conference_t conference_type, int verbose) arraylist_t

Extend a list of conference designs with a single column

Research function.

oalib.extend_double_conference(arraylist_t lst, conference_t conference_type, int verbose) arraylist_t

Extend a list of double conference matrices with an additional column

The list of designs is extended by adding each design with the candidate extentions generated by CandidateGeneratorDouble.

Parameters
  • lst (*) – List of double conference designs

  • conference_type (*) – Type specification for the double conference designs

  • verbose (*) – Verbosity level

Returns

Return type

List of generated double conference designs

oalib.fastJupdate(array, N, J, column_indices, tmp)

helper function to calculate J-values

oalib.fastrand() int
oalib.fastrandK(int k) int
oalib.file_exists(*args)

Overload 1: return true if the specified file exists


Overload 2: return true if the specified file exists

oalib.flush_stdout()

flush to stdout

oalib.generateConferenceExtensions(array_link array, conference_t conference_type, int zero_index, int verbose=1, int filter_symmetry=1, int filterj2=1) conference_columnVector

Generate candidate extensions for a conference design

Parameters
  • array (*) – Design to be extended

  • conference_type (*) – Class of conference designs

  • zero_index (*) – Index of zero in candidate column

  • verbose (*) – Verbosity level

  • filter_symmetry (*) – If True, filter based on symmetry

  • filterj2 (*) – If True, filter based on J2 values

Returns

Return type

List of generated extensions

oalib.generateConferenceRestrictedExtensions(array_link array, conference_t conference_type, int zero_index, int verbose=1, int filter_symmetry=1, int filterip=1) conference_columnVector

Generate candidate extensions for restricted isomorphism classes

oalib.generateDoubleConferenceExtensions(array_link array, conference_t conference_type, int verbose=1, int filter_symmetry=1, int filterip=1, int filterJ3=0, int filter_symmetry_inline=1) conference_columnVector

generate extensions for double conference matrices in LMC0 form

oalib.generateSingleConferenceExtensions(array_link array, conference_t conference_type, int zero_index, int verbose, int filter_symmetry, int filterj2, int filterj3, int filter_symmetry_inline=0) conference_columnVector

generate extensions for conference matrices in LMC0 form

The the method assumes that the input array is in LMC0 format. In particular, the element at row 0 and column 0 of the design should be a zero.

Parameters
  • array (*) – Design to generate extensions for

  • conference_type (*) – Specification of the type of designs

  • zero_index (*) – Passed to checkZeroPosition to determine whether a zero in the extension column is in a valid position

  • verbose (*) – Verbosity level

  • filter_symmetry (*) – If True than reject extensions which are not minimal according to the row symmetry group of the specified design

  • filterj2 (*) – If True than reject extensions which do not satisfy the J2 criterea

  • filterj3 (*) – If True than reject extensions which do not satisfy the J3 criterea

  • filter_symmetry_inline (*) – Quick rejection of extensions which do not satisfy the symmetry criterion.

Returns

Return type

List of extensions of the design

oalib.getJcounts(arraylist, N, k, verbose=1)

Return number of arrays with j_{2n+1}=0 for number_of_arrays<m

oalib.get_time_ms() double
oalib.get_time_ms(double t0) double

return time difference with milisecond precision

oalib.getloglevel() int

return current level of logging

oalib.has_zlib() int

Return true if zlib is available and compressed files can be read.

oalib.hstack(*args)

Overload 1: concatenate 2 arrays in vertical direction


Overload 2: concatenate array and conference_column

oalib.hstacklastcol(A, B)

concatenate the last column of array B to array A

class oalib.indexsort(nn)

Bases: object

indexsort(nn) indexsort(vals) indexsort(vals)

Class to sort data without moving the data in memory.

The data is sorted by using a list of indices. A stable sort is being used.

Constructors

  • indexsort(nn)

  • indexsort(vals)

    Constructor for deque class.

  • indexsort(vals)

    Constructor for vector class.

\* `indices`
Type

std::vector< int >

C++ includes
Type

mathtools.h

property indices

indices : std::vector<(int,std::allocator<(int)>)>

issorted(indexsort self) bool

Returns true of the data is sorted ascending.

issorteddescending(indexsort self) bool

Returns true of the data is sorted descending.

show(indexsort self)
property thisown

The membership flag

class oalib.intVector(*args)

Bases: object

Proxy of C++ std::vector< int > class.

append(intVector self, std::vector< int >::value_type const & x)
assign(intVector self, std::vector< int >::size_type n, std::vector< int >::value_type const & x)
back(intVector self) std::vector< int >::value_type const &
begin(intVector self) std::vector< int >::iterator
capacity(intVector self) std::vector< int >::size_type
clear(intVector self)
empty(intVector self) bool
end(intVector self) std::vector< int >::iterator
erase(intVector self, std::vector< int >::iterator pos) std::vector< int >::iterator
erase(intVector self, std::vector< int >::iterator first, std::vector< int >::iterator last) std::vector< int >::iterator
front(intVector self) std::vector< int >::value_type const &
get_allocator(intVector self) std::vector< int >::allocator_type
insert(intVector self, std::vector< int >::iterator pos, std::vector< int >::value_type const & x) std::vector< int >::iterator
insert(intVector self, std::vector< int >::iterator pos, std::vector< int >::size_type n, std::vector< int >::value_type const & x) None
iterator(intVector self) SwigPyIterator
pop(intVector self) std::vector< int >::value_type
pop_back(intVector self)
push_back(intVector self, std::vector< int >::value_type const & x)
rbegin(intVector self) std::vector< int >::reverse_iterator
rend(intVector self) std::vector< int >::reverse_iterator
reserve(intVector self, std::vector< int >::size_type n)
resize(intVector self, std::vector< int >::size_type new_size)
resize(intVector self, std::vector< int >::size_type new_size, std::vector< int >::value_type const & x) None
size(intVector self) std::vector< int >::size_type
swap(intVector self, intVector v)
property thisown

The membership flag

oalib.ipow(long x, long y) long
oalib.ipow(unsigned int x, unsigned int p) unsigned int

Power of two unsigned integers.

oalib.isConferenceFoldover(array_link array, int verbose=0) bool

return true if the design is a foldover array

oalib.is_root_form(array_link array, int strength) bool

Return True if the array is in root form

Parameters
  • array (*) – Array to check

  • strength (*) – Strength to use

Returns

Return type

True if the array is in root form for the specified strength

class oalib.jindex_t(colindex, jvalue)

Bases: object

jindex_t(colindex, jvalue)

helper class for indexing statistics of designs

The index consists of the number of columns and the value for the J-characteristic

Constructors

  • jindex_t(colindex, jvalue)

\* `k`

number of columns

Type

int

\* `j`

J-value.

Type

int

C++ includes
Type

evenodd.h

property j

J-value

property k

number of columns

property thisown

The membership flag

toString(jindex_t self) std::string
class oalib.jstructArray(*args)

Bases: object

Proxy of C++ std::vector< jstruct_t > class.

append(jstructArray self, jstruct_t x)
assign(jstructArray self, std::vector< jstruct_t >::size_type n, jstruct_t x)
back(jstructArray self) jstruct_t
begin(jstructArray self) std::vector< jstruct_t >::iterator
capacity(jstructArray self) std::vector< jstruct_t >::size_type
clear(jstructArray self)
empty(jstructArray self) bool
end(jstructArray self) std::vector< jstruct_t >::iterator
erase(jstructArray self, std::vector< jstruct_t >::iterator pos) std::vector< jstruct_t >::iterator
erase(jstructArray self, std::vector< jstruct_t >::iterator first, std::vector< jstruct_t >::iterator last) std::vector< jstruct_t >::iterator
front(jstructArray self) jstruct_t
get_allocator(jstructArray self) std::vector< jstruct_t >::allocator_type
insert(jstructArray self, std::vector< jstruct_t >::iterator pos, jstruct_t x) std::vector< jstruct_t >::iterator
insert(jstructArray self, std::vector< jstruct_t >::iterator pos, std::vector< jstruct_t >::size_type n, jstruct_t x) None
iterator(jstructArray self) SwigPyIterator
pop(jstructArray self) jstruct_t
pop_back(jstructArray self)
push_back(jstructArray self, jstruct_t x)
rbegin(jstructArray self) std::vector< jstruct_t >::reverse_iterator
rend(jstructArray self) std::vector< jstruct_t >::reverse_iterator
reserve(jstructArray self, std::vector< jstruct_t >::size_type n)
resize(jstructArray self, std::vector< jstruct_t >::size_type new_size)
resize(jstructArray self, std::vector< jstruct_t >::size_type new_size, jstruct_t x) None
size(jstructArray self) std::vector< jstruct_t >::size_type
swap(jstructArray self, jstructArray v)
property thisown

The membership flag

class oalib.jstruct_t(*args)

Bases: object

jstruct_t() jstruct_t(al, jj=4) jstruct_t(N, K, jj=4) jstruct_t(js)

struct to hold data of an array, e.g. J-characteristic, rank

See papers: Minimum G2-aberration properties of two-level foldover designs, Butler, 2004 Design Selection and Classification for Hadamard Matrices Using Generalized Minimum Aberration Criteria, Deng and Tang

Constructors

  • jstruct_t()

    Create an object to calculate J-characteristics.

  • jstruct_t(al, jj=4)

    Create an object to calculate J-characteristics.

  • jstruct_t(N, K, jj=4)

    Create an object to calculate J-characteristics.

  • jstruct_t(js)

    Create an object to calculate J-characteristics.

\* `N`

number of rows in array

Type

int

\* `k`

number of columns in array

Type

int

\* `jj`

J-characteristic that is calculated.

Type

int

\* `nc`

number of column combinations possible

Type

int

\* `values`

contains calculated J-values

Type

std::vector< int >

\* `abberration`

calculated abberation

Type

double

C++ includes
Type

arraytools.h

Fval(jstruct_t self, int strength=3) intVector

Calculate possible values in F vector

Parameters

strength (*) – Strength to use

Returns

Return type

Vector with possible Jk values (ordered from high to low)

property N

number of rows in array

property abberration

calculated abberation

allzero(jstruct_t self) int

return 1 if all J values are zero, otherwise return 0

calcj5(al)

calculate J-characteristics of a 2-level array, special function for jj=5

calculateAberration(jstruct_t self)

Calculate aberration value

This is equal to the sum of the squares of all Jk values, divided by the number of rows squared.

The calculated abberation is stored in the variable abberation.

calculateF(jstruct_t self, int strength=3) intVector

calculate histogram of J values for a 2-level array

property jj

J-characteristic that is calculated

property k

number of columns in array

maxJ(jstruct_t self) int

calculate maximum J value

property nc

number of column combinations possible

number_J_values(jstruct_t self, int strength) int

Calculate the number of possible J values that can occur for the given strength.

show(jstruct_t self)

Show contents of structure.

showdata(jstruct_t self)
showstr(jstruct_t self) std::string
property thisown

The membership flag

property values

contains calculated J-values

class oalib.jstructbase_t(*args, **kwargs)

Bases: object

struct to hold data of an array, e.g. J-characteristic. Abstract base class

\* `values`

calculated J-characteristics

Type

std::vector< int >

\* `jvalues`
Type

std::vector< int >

\* `jvalue2index`

map from Jk-value to index in the jvalues variable

Type

std::map< int, int >

\* `jj`

number of columns

Type

int

C++ includes
Type

arraytools.h

Jvalues(jstructbase_t self) intVector

calculate possible values in F vector

allzero(jstructbase_t self) int

return 1 if all vals are zero

calc(jstructbase_t self, array_link array)

Calculate the J-values for a given array.

calculateF(jstructbase_t self) intVector

Calculate histogram of J values

return Histogram of J values

The histogram bins are given by the values of @ref Jvalues.

property jj

number of columns

property jvalue2index

map from Jk-value to index in the jvalues variable

property jvalues

jvalues : std::vector<(int,std::allocator<(int)>)>

maxJ(jstructbase_t self) int

calculate maximum J value

show(jstructbase_t self)

Show contents of structure.

showdata(jstructbase_t self, int verbose=1)
showstr(jstructbase_t self) std::string
property thisown

The membership flag

property values

calculated J-characteristics

class oalib.jstructconference_t(*args)

Bases: jstructbase_t

jstructconference_t(N, jj=4) jstructconference_t(array, jj=4)

Calculate J-characteristics of conference designs

Constructors

  • jstructconference_t(N, jj=4)

    Create structure to calculate J-characteristics of conference designs

    Parameters: * N :

    Number of rows

    • jj :

      Number of columns to use for the Jk-characteristics

  • jstructconference_t(array, jj=4)

    Calculate J-characteristics of a conference design

    Parameters: * array :

    Array to calculate the J-characteristics for

    • jj :

      Number of columns to use for the Jk-characteristics

C++ includes: arraytools.h

property thisown

The membership flag

oalib.jvalue(array, J, column_indices)

Calculate J-value for a 2-level array

oalib.jvaluefast(array, N, J, column_indices)

Calculate J-value for a column combination of a 2-level array

We assume the array has values 0 and 1. No boundary checks are performed.

oalib.krawtchouk(long j, long x, long n, long s, int verbose=0) long

calculate value of Krawtchouk polynomial

oalib.log_print(int const level, char const * message) int
class oalib.longDeque(*args)

Bases: object

Proxy of C++ std::deque< long > class.

append(longDeque self, std::deque< long >::value_type const & x)
assign(longDeque self, std::deque< long >::size_type n, std::deque< long >::value_type const & x)
back(longDeque self) std::deque< long >::value_type const &
begin(longDeque self) std::deque< long >::iterator
clear(longDeque self)
empty(longDeque self) bool
end(longDeque self) std::deque< long >::iterator
erase(longDeque self, std::deque< long >::iterator pos) std::deque< long >::iterator
erase(longDeque self, std::deque< long >::iterator first, std::deque< long >::iterator last) std::deque< long >::iterator
front(longDeque self) std::deque< long >::value_type const &
get_allocator(longDeque self) std::deque< long >::allocator_type
insert(longDeque self, std::deque< long >::iterator pos, std::deque< long >::value_type const & x) std::deque< long >::iterator
insert(longDeque self, std::deque< long >::iterator pos, std::deque< long >::size_type n, std::deque< long >::value_type const & x) None
iterator(longDeque self) SwigPyIterator
pop(longDeque self) std::deque< long >::value_type
pop_back(longDeque self)
pop_front(longDeque self)
push_back(longDeque self, std::deque< long >::value_type const & x)
push_front(longDeque self, std::deque< long >::value_type const & x)
rbegin(longDeque self) std::deque< long >::reverse_iterator
rend(longDeque self) std::deque< long >::reverse_iterator
resize(longDeque self, std::deque< long >::size_type new_size)
resize(longDeque self, std::deque< long >::size_type new_size, std::deque< long >::value_type const & x) None
size(longDeque self) std::deque< long >::size_type
swap(longDeque self, longDeque v)
property thisown

The membership flag

class oalib.longVector(*args)

Bases: object

Proxy of C++ std::vector< long > class.

append(longVector self, std::vector< long >::value_type const & x)
assign(longVector self, std::vector< long >::size_type n, std::vector< long >::value_type const & x)
back(longVector self) std::vector< long >::value_type const &
begin(longVector self) std::vector< long >::iterator
capacity(longVector self) std::vector< long >::size_type
clear(longVector self)
empty(longVector self) bool
end(longVector self) std::vector< long >::iterator
erase(longVector self, std::vector< long >::iterator pos) std::vector< long >::iterator
erase(longVector self, std::vector< long >::iterator first, std::vector< long >::iterator last) std::vector< long >::iterator
front(longVector self) std::vector< long >::value_type const &
get_allocator(longVector self) std::vector< long >::allocator_type
insert(longVector self, std::vector< long >::iterator pos, std::vector< long >::value_type const & x) std::vector< long >::iterator
insert(longVector self, std::vector< long >::iterator pos, std::vector< long >::size_type n, std::vector< long >::value_type const & x) None
iterator(longVector self) SwigPyIterator
pop(longVector self) std::vector< long >::value_type
pop_back(longVector self)
push_back(longVector self, std::vector< long >::value_type const & x)
rbegin(longVector self) std::vector< long >::reverse_iterator
rend(longVector self) std::vector< long >::reverse_iterator
reserve(longVector self, std::vector< long >::size_type n)
resize(longVector self, std::vector< long >::size_type new_size)
resize(longVector self, std::vector< long >::size_type new_size, std::vector< long >::value_type const & x) None
size(longVector self) std::vector< long >::size_type
swap(longVector self, longVector v)
property thisown

The membership flag

oalib.macwilliams_transform(B, N, s)

Calculate MacWilliams transform

oalib.macwilliams_transform_mixed(B, N, factor_levels_for_groups, verbose=0)

Calculate MacWilliams transform

Parameters
  • B (ndarray< double >) – Input array

  • N (int) –

  • verbose (int, optional) – Verbosity level

  • factor_levels_for_groups (std::vector< int,std::allocator< int > >) – Factor levels for the groups

Return type

ndarray< double >

Returns

MacWilliams transform of the input array

class oalib.map_int_long(*args)

Bases: object

Proxy of C++ std::map< int,long > class.

asdict(map_int_long self) PyObject *
begin(map_int_long self) std::map< int,long >::iterator
clear(map_int_long self)
count(map_int_long self, std::map< int, long >::key_type const & x) std::map< int,long >::size_type
empty(map_int_long self) bool
end(map_int_long self) std::map< int,long >::iterator
erase(map_int_long self, std::map< int, long >::key_type const & x) std::map< int,long >::size_type
erase(map_int_long self, std::map< int, long >::iterator position) None
erase(map_int_long self, std::map< int, long >::iterator first, std::map< int, long >::iterator last) None
find(map_int_long self, std::map< int, long >::key_type const & x) std::map< int,long >::iterator
get_allocator(map_int_long self) std::map< int,long >::allocator_type
has_key(map_int_long self, std::map< int, long >::key_type const & key) bool
items(map_int_long self) PyObject *
iterator(map_int_long self) SwigPyIterator
iteritems()
iterkeys()
itervalues()
key_iterator(map_int_long self) SwigPyIterator
keys(map_int_long self) PyObject *
lower_bound(map_int_long self, std::map< int, long >::key_type const & x) std::map< int,long >::iterator
rbegin(map_int_long self) std::map< int,long >::reverse_iterator
rend(map_int_long self) std::map< int,long >::reverse_iterator
size(map_int_long self) std::map< int,long >::size_type
swap(map_int_long self, map_int_long v)
property thisown

The membership flag

upper_bound(map_int_long self, std::map< int, long >::key_type const & x) std::map< int,long >::iterator
value_iterator(map_int_long self) SwigPyIterator
values(map_int_long self) PyObject *
oalib.maxz(array_link al, int column_index=-1) int

return max position of zero in array, returns -1 if no zero is found

The parameter k specifies the column to search in. For k=-1 all columns are searched.

oalib.md5(void * data, int number_of_bytes) std::string
oalib.md5(std::string const & filename) std::string

calculate md5 sum of a file on disk

oalib.minz(array_link al, int column_index) int

return minimal position of zero in specified column of a design

oalib.mvalueVector

alias of vector_mvalue_t_long

class oalib.mvalue_t_double(*args)

Bases: object

Multi-value type.

This object represents a multi-valued object. The objects are ordered using lexicographic ordering.

\* `values`

vector containing the values

Type

std::vector< NumericType >

\* `ordering`

value representing the ordering used

Type

direction_t

C++ includes
Type

mathtools.h

direction_t_HIGH = 0

Order from high to low values

direction_t_LOW = 1

Order from low to high values

property ordering

value representing the ordering used

raw_values(mvalue_t_double self) doubleVector

Return vector with the raw values in this object.

show_integer(mvalue_t_double self)

Show the object on stdout by casting to integer type objects.

size(mvalue_t_double self) size_t
string_representation(mvalue_t_double self, char const * separator=";") std::string

return a string representation of the object

property thisown

The membership flag

property values

vector containing the values

class oalib.mvalue_t_long(*args)

Bases: object

Multi-value type.

This object represents a multi-valued object. The objects are ordered using lexicographic ordering.

\* `values`

vector containing the values

Type

std::vector< NumericType >

\* `ordering`

value representing the ordering used

Type

direction_t

C++ includes
Type

mathtools.h

direction_t_HIGH = 0

Order from high to low values

direction_t_LOW = 1

Order from low to high values

property ordering

value representing the ordering used

raw_values(mvalue_t_long self) longVector

Return vector with the raw values in this object.

show_integer(mvalue_t_long self)

Show the object on stdout by casting to integer type objects.

size(mvalue_t_long self) size_t
string_representation(mvalue_t_long self, char const * separator=";") std::string

return a string representation of the object

property thisown

The membership flag

property values

vector containing the values

oalib.myassert(int condition, char const * error_message)

Check whether the condition is true and throw an expception otherwise.

oalib.mycheck_handler(char const * file, char const * func, int line, int condition, char const * error_message)

handler for error messages. throws an std::runtime_error exception

oalib.nArrays(fname)

return number of arrays in an array file

class oalib.ndarray_double(*args)

Bases: object

Class representing an n-dimensional array

The data is stored in a flat array. The dimensions are stored in a vector dims.

property cumdims

cumdims : std::vector<(int,std::allocator<(int)>)>

property cumprod

cumprod : std::vector<(int,std::allocator<(int)>)>

property data

data : p.double

data_pointer()

Return pointer to data

property dims

dims : std::vector<(int,std::allocator<(int)>)>

get(idx)

get value using n-dimensional index

getlinear(idx)

get value using linear index

getlinearidx(idx)

From an n-dimensional index return the linear index in the data

idxstring(linear_idx)

Convert linear index to string representing the index

info(ndarray_double self)
initialize(value)

Initialize array with specified value

property k

dimensions of the array

linear2idx(*args)

Overload 1: convert a linear index to normal indices


Overload 2: convert a linear index to normal indices

property n

n : int

set(idx, val)

set value at position

setconstant(val)

set all values of the array to specified value

setlinear(idx, val)

set value using linear index

property shape
show()

print the array to stdout

sizeof_type()

Return size of ndarray template type

property thisown

The membership flag

totalsize()

size of the array (product of all dimensions)

type_is_floating_point()

Return True is the data type is of floating point type

class oalib.ndarray_long(*args)

Bases: object

Class representing an n-dimensional array

The data is stored in a flat array. The dimensions are stored in a vector dims.

property cumdims

cumdims : std::vector<(int,std::allocator<(int)>)>

property cumprod

cumprod : std::vector<(int,std::allocator<(int)>)>

property data

data : p.long

data_pointer()

Return pointer to data

property dims

dims : std::vector<(int,std::allocator<(int)>)>

get(idx)

get value using n-dimensional index

getlinear(idx)

get value using linear index

getlinearidx(idx)

From an n-dimensional index return the linear index in the data

idxstring(linear_idx)

Convert linear index to string representing the index

info(ndarray_long self)
initialize(value)

Initialize array with specified value

property k

dimensions of the array

linear2idx(*args)

Overload 1: convert a linear index to normal indices


Overload 2: convert a linear index to normal indices

property n

n : int

set(idx, val)

set value at position

setconstant(val)

set all values of the array to specified value

setlinear(idx, val)

set value using linear index

property shape
show()

print the array to stdout

sizeof_type()

Return size of ndarray template type

property thisown

The membership flag

totalsize()

size of the array (product of all dimensions)

type_is_floating_point()

Return True is the data type is of floating point type

oalib.next_comb_s(int * comb, int k, int n) int

Go to next combination in sequence

oalib.numberModelParams(array, order=-1)

Calculate number of parameters in the model matrix

A list of integers is returned, with the number of columns in:

  • The intercept (always 1)

  • The main effects

  • The interaction effects (second order interaction terms without quadratics)

  • The quadratic effects

Parameters
  • array (array_link) – Orthogonal array or conference design

  • order (int, optional) – Not used any more

Return type

std::vector< int,std::allocator< int > >

Returns

List of sizes

oalib.oa_file_exists(*args)

Overload 1: return true if the specified oa file exists


Overload 2: return true if the specified oa file exists

oalib.oadevelop() int
oalib.oafilestring(arraydata_t arrayclass) std::string

return string describing array

oalib.oagraph2transformation(pp, arrayclass, verbose=1)

From a relabelling of the graph return the corresponding array transformation

oalib.optimDeff(array_link array, arraydata_t arrayclass, doubleVector alpha, int verbose=1, coordinate_exchange_method_t optimmethod=DOPTIM_AUTOMATIC, int niter=100000, int nabort=0) array_link

Optimize a design according to the optimization function specified.

Arguments:

Parameters
  • array (*) – Array to be optimized

  • arrayclass (*) – Structure describing the design class

  • alpha (*) – 3x1 array with optimization parameters

  • verbose (*) – Verbosity level

  • optimmethod (*) – Optimization method to use

  • niter (*) – Number of iterations

  • nabort (*) – Number of iterations after which to abort when no improvements are found

Returns

Return type

Optimized designs

class oalib.pairDoptimize(*args)

Bases: object

Proxy of C++ std::pair< std::vector< std::vector< double > >,arraylist_t > class.

property first

first : std::vector<(std::vector<(double,std::allocator<(double)>)>,std::allocator<(std::vector<(double,std::allocator<(double)>)>)>)>

property second

second : std::deque<(array_link,std::allocator<(array_link)>)>

property thisown

The membership flag

class oalib.pairEigenMatrix(*args)

Bases: object

Proxy of C++ std::pair< MatrixFloat,MatrixFloat > class.

property first

first : Eigen::MatrixXd

property second

second : Eigen::MatrixXd

property thisown

The membership flag

class oalib.pairGraphColors(*args)

Bases: object

Proxy of C++ std::pair< array_link,std::vector< int > > class.

property first

first : array_link

property second

second : std::vector<(int,std::allocator<(int)>)>

property thisown

The membership flag

oalib.parsePareto(arraylist_t arraylist, int verbose, paretomethod_t paretomethod=PARETOFUNCTION_DEFAULT) ParetoMultiLongLong
oalib.path_separator() char

return path separator symbol for the current platform

oalib.perform_column_permutation(source, target, perm)

perform column permutation for an array

oalib.perform_row_permutation(source, target, perm)

perform row permutation for an array

oalib.possible_F_values(N, strength)

possible values for J-values of 2-level design

oalib.power_minus_one(int n) int
oalib.power_minus_one(long n) long

-1 to the power n (integer)

oalib.print_array(char const * str, array_t const * array, int const nrows, int const ncols)
oalib.print_array(array_t const * array, rowindex_t const nrows, colindex_t const ncols) None
oalib.print_column(charVector column, char const * msg=None)

print a candidate extension

oalib.print_column_rowsort(array_t const * arraycol, rowsort_t rowsort, int N)

Print copyright statement.

Print copyright statement.

oalib.print_eigen_matrix(matrix)

Print Eigen matrix to stdout

oalib.print_options(std::ostream & output_stream)
oalib.print_options() None

Print compile time options to stdout.

oalib.print_rowsort(rowsort_t rowsort, int N)

Print the contents of a rowsort structure.

Parameters
  • rowsort (*) – Pointer to rowsort structure

  • N (*) – Number of elements

oalib.printdoubleasbits(double double_value, bool add_newline=True)

print a double value as bits

oalib.printfd_handler(char const * file, char const * func, int line, char const * message)

function to print debugging messages

oalib.processDepth(arraylist_t goodarrays, depth_alg_t depthalg, depth_extend_t dextend, depth_extend_sub_t dextendsublight, int extensioncol, int verbose=0)

Extend arrays using a depth-first or breadth-first approach

Parameters
  • goodarrays (*) – List of arrays to extend

  • depthalg (*) – Extend using depth-first or breadth-first

  • dextend (*) – Option structure for the extension

  • dextendsublight (*) – Data structure for the extensions

  • extensioncol (*) – Column to extend

  • verbose (*) – Verbosity level

oalib.projDeff(array_link array, int number_of_factors, int verbose=0) doubleVector

Calculate D-efficiencies for all projection designs

Parameters
  • array (*) – Design to calculate D-efficiencies for

  • number_of_factors (*) – Number of factors into which to project

  • verbose (*) – Verbosity level

Returns

Return type

Vector with calculated D-efficiencies

oalib.projectionDOFvalues(array_link array, int verbose=0) vector_mvalue_t_double

Calculate projection values for delete-of-factor algorithm

oalib.projectionGWLPs(array_link al) vector_mvalue_t_double

calculate delete-one-factor GWLP (generalized wordlength pattern) projections

class oalib.rankStructure(*args)

Bases: object

rankStructure(al, nsub=3, verbose=0) rankStructure(nsub=3, id=-1)

Structure to efficiently calculate the rank of the second order interaction matrix of many arrays

The efficiency is obtained if the arrays share a common subarray. The theory is described in “Efficient rank calculation for matrices with a common submatrix”, Eendebak, 2016

Constructors

  • rankStructure(al, nsub=3, verbose=0)

    constructor

  • rankStructure(nsub=3, id=-1)

    constructor

\* `alsub`
Type

array_link

\* `r`
Type

int

\* `verbose`

verbosity level

Type

int

\* `ks`

number of columns of subarray in cache

Type

int

\* `nsub`

number of columns to subtract from array when updating cache

Type

int

\* `id`

used for debugging

Type

int

C++ includes
Type

arrayproperties.h

property alsub

alsub : array_link

property id

used for debugging

info(rankStructure self)

print information about the rank structure

property ks

number of columns of subarray in cache

property nsub

number of columns to subtract from array when updating cache

property r

r : int

rankdirect(rankStructure self, Eigen::MatrixXd const & array) int

calculate the rank of an array directly, uses special threshold

rankxf(rankStructure self, array_link array) int

calculate the rank of the second order interaction matrix of an array using the cache system

rankxfdirect(rankStructure self, array_link array) int

calculate the rank of the second order interaction matrix of an array directly

property thisown

The membership flag

updateStructure(rankStructure self, array_link al)

update the structure cache with a new array

property verbose

verbosity level

oalib.readConfigFile(file)

Read array configuration from file

oalib.readStatisticsFile(char const * numbersfile, int verbose) Jcounter

read statistics object from disk

oalib.readarrayfile(*args)
Overload 1:

Read all arrays in a file and append then to an array list

Parameters
  • filename (string) – Filename to read from

  • arraylist (arraylist_t) – Pointer to list of arrays

  • verbose (int, optional) – Verbosity level

  • setcols (int, optional) – Reference that is set with the number of columns from the file

  • setrows (int, optional) – Reference that is set with the number of rows from the file

  • setbits (int, optional) – Reference that is set with the number of bits from the file

Return type

int

Returns


Overload 2:

Read all arrays in a file and append then to an array list

Parameters
  • filename (string) – Filename to read from

  • arraylist (arraylist_t) – Pointer to list of arrays

  • verbose (int, optional) – Verbosity level

  • setcols (int, optional) – Reference that is set with the number of columns from the file

  • setrows (int, optional) – Reference that is set with the number of rows from the file

  • setbits – Reference that is set with the number of bits from the file

Return type

int

Returns


Overload 3:

Read all arrays in a file and append then to an array list

Parameters
  • filename (string) – Filename to read from

  • arraylist (arraylist_t) – Pointer to list of arrays

  • verbose (int, optional) – Verbosity level

  • setcols (int, optional) – Reference that is set with the number of columns from the file

  • setrows – Reference that is set with the number of rows from the file

  • setbits – Reference that is set with the number of bits from the file

Return type

int

Returns


Overload 4:

Read all arrays in a file and append then to an array list

Parameters
  • filename (string) – Filename to read from

  • arraylist (arraylist_t) – Pointer to list of arrays

  • verbose (int, optional) – Verbosity level

  • setcols – Reference that is set with the number of columns from the file

  • setrows – Reference that is set with the number of rows from the file

  • setbits – Reference that is set with the number of bits from the file

Return type

int

Returns


Overload 5:

Read all arrays in a file and append then to an array list

Parameters
  • filename (string) – Filename to read from

  • arraylist (arraylist_t) – Pointer to list of arrays

  • verbose – Verbosity level

  • setcols – Reference that is set with the number of columns from the file

  • setrows – Reference that is set with the number of rows from the file

  • setbits – Reference that is set with the number of bits from the file

Return type

int

Returns

oalib.readbinheader(fid, nr, nc)

Read header for binary data file. Return true if valid header file

The header consists of 4 integers: 2 magic numbers, then the number of rows and columns

oalib.reduceArraysGWLP(arraylist_t input_arrays, arraylist_t reduced_arrays, int verbose, int dopruning=1, int strength=2, int dolmc=1)

reduce arrays to canonical form using delete-1-factor ordering

oalib.reduceConference(array_link arg1, int verbose=0) array_link

Reduce conference matrix to normal form using Nauty

See also: reduceConferenceTransformation

oalib.reduceConferenceTransformation(array_link conference_design, int verbose) conference_transformation_t

Reduce conference matrix to normal form using Nauty

The design is converted to a graph representation. The graph is then reduced using Nauty to normal form and the resulting graph translated back to a conference design.

Parameters
  • conference_design (*) – Design to be reduced to normal form

  • verbose (*) – Verbosity level

Returns

Return type

A transformation that converts the input design to normal form

oalib.reduceDOPform(array_link array, int verbose=0) array_link

Reduce an array to canonical form using delete-1-factor ordering

The normal form is described in “A canonical form for non-regular arrays based on generalized wordlength pattern values of delete-one-factor projections”, Eendebak, 2014

Parameters
  • array (*) – Orthogonal array

  • verbose (*) – Verbosity level

Returns

Return type

The array transformed to normal form

oalib.reduceGraphNauty(G, colors: Optional[List] = None, verbose: int = 1) List

Return vertex transformation reducing array to normal form

The reduction is calculated using Nauty

Parameters
  • G (numpy array or array_link) – the graph in incidence matrix form

  • colors – an optional vertex coloring

  • verbose – Verbosity level

Returns

Relabelling of the vertices

oalib.reduceLMCform(array_link array) array_link

reduce an array to canonical form using LMC ordering

oalib.reduceNauty(array_link graph, intVector colors, int verbose=0) intVector

Reduce a colored graph to Nauty minimal form

The transformation returned is from the normal form to the specified graph.

Parameters
  • graph (*) – Graph in incidence matrix form

  • colors (*) – Colors of the graph nodes

  • verbose (*) – Verbosity level

Returns

Return type

Relabelling of the graph vertices

oalib.reduceOAnauty(*args)

Overload 1: Reduce an orthogonal array to Nauty minimal form. the array transformation is returned


Overload 2: Reduce an orthogonal array to Nauty minimal form. the array transformation is returned

oalib.reductionDOP(array_link array, int verbose=0) array_transformation_t

Caculate the transformation reducing an array to delete-on-factor normal

The normal form is described in “A canonical form for non-regular arrays based on generalized wordlength pattern values of delete-one-factor projections”, Eendebak, 2014

Parameters
  • array (*) – Orthogonal array

  • verbose (*) – Verbosity level

Returns

Return type

The transformation that reduces the array to normal form

oalib.release_LMCreduction_object(LMCreduction_helper_t p)
oalib.replaceString(std::string subject, std::string const & search, std::string const & replacement) std::string

replace all occurces of a substring in a string

class oalib.rowsort_t

Bases: object

type for value for sorting rows structure to perform row sorting

property r

index of row

property thisown

The membership flag

property val

value of row

class oalib.rowsorter_t(number_of_rows)

Bases: object

rowsorter_t(number_of_rows)

Structure to sort rows of arrays.

Constructors

  • rowsorter_t(number_of_rows)

\* `number_of_rows`
Type

int

\* `rowsort`
Type

rowsort_t *

C++ includes
Type

lmc.h

property number_of_rows

number_of_rows : int

property rowsort

rowsort : p.rowsort_t

property thisown

The membership flag

oalib.runExtendRoot(arraydata_t arrayclass, int max_number_columns, int verbose=0) arraylist_t

Run the LMC extension algorithm starting with the root array

See also: extend_array(const array_link &, arraydata_t &, OAextend const &)

oalib.scoreD(doubleVector efficiencies, doubleVector weights) double

Calculate score from a set of efficiencies

The score is the weighted sum of the efficiencies.

Parameters
  • efficiencies (*) – Vector with calculated efficiencies

  • weights (*) – Weights for the efficiencies

Returns

Return type

Weighted sum of the efficiencies

oalib.seedfastrand(int s)
oalib.selectArrays(*args)

Overload 1: Make a selection of arrays from binary array file, append to list


Overload 2: Select a single array from a file


Overload 3: Make a selection of arrays


Overload 4: Make a selection of arrays


Overload 5: Make a selection of arrays, append to list


Overload 6: Make a selection of arrays, append to list

oalib.selectConferenceIsomorpismClasses(arraylist_t list, int verbose, matrix_isomorphism_t itype=CONFERENCE_ISOMORPHISM) arraylist_t

Select representatives for the isomorphism classes of a list of conference arrays

The method uses Nauty for reduction to normal form and selection of isomorphism classes.

Parameters
  • list (*) – List of designs

  • verbose (*) – Verbosity level

  • itype (*) – Specification of the type of isomorphism to use

Returns

Return type

Selected isomorphism classes

oalib.selectConferenceIsomorpismIndices(arraylist_t lst, int verbose, matrix_isomorphism_t itype=CONFERENCE_ISOMORPHISM) intVector

select representatives for the isomorphism classes of a list of conference arrays, return indices of classes

oalib.selectLMC0(arraylist_t list, int verbose, conference_t ctype) arraylist_t

Select conference designs in LMC0 form

Parameters
  • list (*) – List of conference designs

  • verbose (*) – Verbosity level

  • ctype (*) – Specification of the class of designs

Returns

Return type

List with only the designs in the input list that are in LMC0 normal form.

oalib.selectLMC0doubleconference(arraylist_t list, int verbose, conference_t ctype) arraylist_t

Select double conference designs in LMC0 form

Parameters
  • list (*) – List of double conference designs

  • verbose (*) – Verbosity level

  • ctype (*) – Specifiation of the class of designs

Returns

Return type

List with only the designs in the input list that are in LMC0 normal form.

oalib.selectUniqueArrays(arraylist_t input_arrays, arraylist_t output_arrays, int verbose=1)

select the unique arrays in a list, the original list is sorted in place. the unique arrays are append to the output list

oalib.set_srand(unsigned int s)

seed the C rand method with the srand function

oalib.setloglevel(int n)

reset the level of logging

oalib.showArrayList(lst)

print a list of arrays to stdout

oalib.showCandidates(conference_columnVector column_candidates)

Show a list of candidate extensions

Parameters

column_candidates (*) – List of candidates to show

oalib.sizeof_array_t()

return size in bytes of array_t type

oalib.sizeof_double()

return size in bytes of double type

oalib.sortGWLP(vector_mvalue_t_double arg1) vector_mvalue_t_double

sort a list of GWLP values and return the sorted list

oalib.sortLMC0(arraylist_t arrays) arraylist_t

sort list of conference designs according to LMC0 ordering

oalib.splitDir(intVector tag_indices) std::string

calculate directory name for job splitted into parts

oalib.splitFile(intVector tag_indices) std::string

calculate file name of job splitted into parts

oalib.splitTag(intVector tag_indices) std::string

calculate tag for job splitted into parts

class oalib.stringVector(*args)

Bases: object

Proxy of C++ std::vector< std::string > class.

append(stringVector self, std::vector< std::string >::value_type const & x)
assign(stringVector self, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const & x)
back(stringVector self) std::vector< std::string >::value_type const &
begin(stringVector self) std::vector< std::string >::iterator
capacity(stringVector self) std::vector< std::string >::size_type
clear(stringVector self)
empty(stringVector self) bool
end(stringVector self) std::vector< std::string >::iterator
erase(stringVector self, std::vector< std::string >::iterator pos) std::vector< std::string >::iterator
erase(stringVector self, std::vector< std::string >::iterator first, std::vector< std::string >::iterator last) std::vector< std::string >::iterator
front(stringVector self) std::vector< std::string >::value_type const &
get_allocator(stringVector self) std::vector< std::string >::allocator_type
insert(stringVector self, std::vector< std::string >::iterator pos, std::vector< std::string >::value_type const & x) std::vector< std::string >::iterator
insert(stringVector self, std::vector< std::string >::iterator pos, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const & x) None
iterator(stringVector self) SwigPyIterator
pop(stringVector self) std::vector< std::string >::value_type
pop_back(stringVector self)
push_back(stringVector self, std::vector< std::string >::value_type const & x)
rbegin(stringVector self) std::vector< std::string >::reverse_iterator
rend(stringVector self) std::vector< std::string >::reverse_iterator
reserve(stringVector self, std::vector< std::string >::size_type n)
resize(stringVector self, std::vector< std::string >::size_type new_size)
resize(stringVector self, std::vector< std::string >::size_type new_size, std::vector< std::string >::value_type const & x) None
size(stringVector self) std::vector< std::string >::size_type
swap(stringVector self, stringVector v)
property thisown

The membership flag

class oalib.symmdata(al, minlen=1)

Bases: object

symmdata(al, minlen=1)

structure containing data related to symmetries of arrays

Constructors

  • symmdata(al, minlen=1)

\* `rowvalue`
Type

array_link

\* `orig`
Type

array_link

\* `ft`
Type

array_link

C++ includes
Type

arraytools.h

checkIdx(symmdata self, int col=-1) intVector

list with indices set to check for symmetry reductions

property ft

ft : array_link

property orig

orig : array_link

property rowvalue

rowvalue : array_link

show(symmdata self, int verbose=1)
property thisown

The membership flag

class oalib.symmetry_group(*args)

Bases: object

symmetry_group(vals, ascending=true, verbose=0) symmetry_group(vals, ascending=true, verbose=0) symmetry_group(vals, ascending=true, verbose=0) symmetry_group(vals, ascending=true, verbose=0) symmetry_group(vals, ascending=true, verbose=0) symmetry_group(vals, ascending=true, verbose=0) symmetry_group(vals, ascending=true, verbose=0) symmetry_group(sgx) symmetry_group()

Class to describe the symmetry group of a list of elements.

The class assumes the list is sorted. The symmetry group is then a direct product of full permutation groups.

We do not implement this using templates because we want to export to Python.

Constructors

  • symmetry_group(vals, ascending=true, verbose=0)

  • symmetry_group(vals, ascending=true, verbose=0)

  • symmetry_group(vals, ascending=true, verbose=0)

  • symmetry_group(vals, ascending=true, verbose=0)

  • symmetry_group(vals, ascending=true, verbose=0)

  • symmetry_group(vals, ascending=true, verbose=0)

  • symmetry_group(vals, ascending=true, verbose=0)

  • symmetry_group(sgx)

  • symmetry_group()

    default constructor

\* `gidx`
Type

std::vector< int >

\* `gstart`

start of the subgroups

Type

std::vector< int >

\* `gsize`

size of the subgroups

Type

std::vector< int >

\* `ngroups`

number of subgroups

Type

int

\* `n`

number of elements

Type

int

\* `ascending`

ordering of elements

Type

bool

C++ includes
Type

mathtools.h

property ascending

ordering of elements

checkIndices(symmetry_group self) intVector

list with indices set to check for symmetry reductions

property gidx

gidx : std::vector<(int,std::allocator<(int)>)>

property gsize

size of the subgroups

property gstart

start of the subgroups

property n

number of elements

property ngroups

number of subgroups

permsize(symmetry_group self) symmetry_group::perm_return_type

Return size of the group of all permutations respecting the symmetry

The return type can overflow quickly. For larger group sizes use permsize_large

permsize_large(symmetry_group self) InfInt

return size of the group of all permutations respecting the symmetry

show(symmetry_group self, int verbose=1)

show the symmetry group

property thisown

The membership flag

class oalib.symmetry_group_walker(sg)

Bases: object

symmetry_group_walker(sg)

Class to walk over all elements of a symmetry group

The elements are generated by walking over all product permutations.

Constructors

  • symmetry_group_walker(sg)

\* `sg`

symmetry group

Type

symmetry_group

\* `perms`

current element of the symmetry group

Type

std::vector< std::vector< int > >

C++ includes
Type

mathtools.h

fullperm(symmetry_group_walker self) intVector

return the full permutation corresponding to the current permutation in the walker

next(symmetry_group_walker self) bool

go to next element of the symmetry group

property perms

current element of the symmetry group

property sg

symmetry group

show(symmetry_group_walker self, int verbose=1)

show all elements in the symmetry group

property thisown

The membership flag

oalib.system_uname() std::string

Return string describing the system.

oalib.testLMC0checkDC(array_link al, int verbose=1) bool
oalib.test_array_manipulation(int verbose=1)
oalib.test_conference_candidate_generators(int verbose=1)
oalib.throw_runtime_exception(std::string const exception_message)

Throw a runtime_error exception with specified error message

This exception is caught in the SWIG interface.

oalib.transformGraph(graph, vertex_permutation, verbose=1)

Apply a vertex permutation to a graph

oalib.transformGraphMatrix(G, tr, verbose=1)

Apply a vertex permutation to a graph

Parameters
  • G (Numpy array) – the graph in incidence matrix form

  • tr (list) – the vertex transformation as a list

Returns

Return type

The transformed graph

oalib.trim(std::string & str, std::string const & trimChars="")

trim a string by removing the specified characters from the left and right

class oalib.uint8Vector(*args)

Bases: object

Proxy of C++ std::vector< unsigned char > class.

append(uint8Vector self, std::vector< unsigned char >::value_type const & x)
assign(uint8Vector self, std::vector< unsigned char >::size_type n, std::vector< unsigned char >::value_type const & x)
back(uint8Vector self) std::vector< unsigned char >::value_type const &
begin(uint8Vector self) std::vector< unsigned char >::iterator
capacity(uint8Vector self) std::vector< unsigned char >::size_type
clear(uint8Vector self)
empty(uint8Vector self) bool
end(uint8Vector self) std::vector< unsigned char >::iterator
erase(uint8Vector self, std::vector< unsigned char >::iterator pos) std::vector< unsigned char >::iterator
erase(uint8Vector self, std::vector< unsigned char >::iterator first, std::vector< unsigned char >::iterator last) std::vector< unsigned char >::iterator
front(uint8Vector self) std::vector< unsigned char >::value_type const &
get_allocator(uint8Vector self) std::vector< unsigned char >::allocator_type
insert(uint8Vector self, std::vector< unsigned char >::iterator pos, std::vector< unsigned char >::value_type const & x) std::vector< unsigned char >::iterator
insert(uint8Vector self, std::vector< unsigned char >::iterator pos, std::vector< unsigned char >::size_type n, std::vector< unsigned char >::value_type const & x) None
iterator(uint8Vector self) SwigPyIterator
pop(uint8Vector self) std::vector< unsigned char >::value_type
pop_back(uint8Vector self)
push_back(uint8Vector self, std::vector< unsigned char >::value_type const & x)
rbegin(uint8Vector self) std::vector< unsigned char >::reverse_iterator
rend(uint8Vector self) std::vector< unsigned char >::reverse_iterator
reserve(uint8Vector self, std::vector< unsigned char >::size_type n)
resize(uint8Vector self, std::vector< unsigned char >::size_type new_size)
resize(uint8Vector self, std::vector< unsigned char >::size_type new_size, std::vector< unsigned char >::value_type const & x) None
size(uint8Vector self) std::vector< unsigned char >::size_type
swap(uint8Vector self, uint8Vector v)
property thisown

The membership flag

oalib.unittest_nautynormalform(array_link al, int verbose) int
oalib.unittest_reduceConferenceTransformation() int

Update the data of an array_link with the specified data

oalib.valid_ptr(sd)

Return true if the (smart) symmdataPointer pointer is allocated

class oalib.vector_mvalue_t_double(*args)

Bases: object

Proxy of C++ std::vector< mvalue_t< double > > class.

append(vector_mvalue_t_double self, mvalue_t_double x)
assign(vector_mvalue_t_double self, std::vector< mvalue_t< double > >::size_type n, mvalue_t_double x)
back(vector_mvalue_t_double self) mvalue_t_double
begin(vector_mvalue_t_double self) std::vector< mvalue_t< double > >::iterator
capacity(vector_mvalue_t_double self) std::vector< mvalue_t< double > >::size_type
clear(vector_mvalue_t_double self)
empty(vector_mvalue_t_double self) bool
end(vector_mvalue_t_double self) std::vector< mvalue_t< double > >::iterator
erase(vector_mvalue_t_double self, std::vector< mvalue_t< double > >::iterator pos) std::vector< mvalue_t< double > >::iterator
erase(vector_mvalue_t_double self, std::vector< mvalue_t< double > >::iterator first, std::vector< mvalue_t< double > >::iterator last) std::vector< mvalue_t< double > >::iterator
front(vector_mvalue_t_double self) mvalue_t_double
get_allocator(vector_mvalue_t_double self) std::vector< mvalue_t< double > >::allocator_type
insert(vector_mvalue_t_double self, std::vector< mvalue_t< double > >::iterator pos, mvalue_t_double x) std::vector< mvalue_t< double > >::iterator
insert(vector_mvalue_t_double self, std::vector< mvalue_t< double > >::iterator pos, std::vector< mvalue_t< double > >::size_type n, mvalue_t_double x) None
iterator(vector_mvalue_t_double self) SwigPyIterator
pop(vector_mvalue_t_double self) mvalue_t_double
pop_back(vector_mvalue_t_double self)
push_back(vector_mvalue_t_double self, mvalue_t_double x)
rbegin(vector_mvalue_t_double self) std::vector< mvalue_t< double > >::reverse_iterator
rend(vector_mvalue_t_double self) std::vector< mvalue_t< double > >::reverse_iterator
reserve(vector_mvalue_t_double self, std::vector< mvalue_t< double > >::size_type n)
resize(vector_mvalue_t_double self, std::vector< mvalue_t< double > >::size_type new_size)
resize(vector_mvalue_t_double self, std::vector< mvalue_t< double > >::size_type new_size, mvalue_t_double x) None
size(vector_mvalue_t_double self) std::vector< mvalue_t< double > >::size_type
swap(vector_mvalue_t_double self, vector_mvalue_t_double v)
property thisown

The membership flag

class oalib.vector_mvalue_t_int(*args)

Bases: object

Proxy of C++ std::vector< mvalue_t< int > > class.

append(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::value_type const & x)
assign(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::size_type n, std::vector< mvalue_t< int > >::value_type const & x)
back(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::value_type const &
begin(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::iterator
capacity(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::size_type
clear(vector_mvalue_t_int self)
empty(vector_mvalue_t_int self) bool
end(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::iterator
erase(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::iterator pos) std::vector< mvalue_t< int > >::iterator
erase(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::iterator first, std::vector< mvalue_t< int > >::iterator last) std::vector< mvalue_t< int > >::iterator
front(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::value_type const &
get_allocator(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::allocator_type
insert(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::iterator pos, std::vector< mvalue_t< int > >::value_type const & x) std::vector< mvalue_t< int > >::iterator
insert(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::iterator pos, std::vector< mvalue_t< int > >::size_type n, std::vector< mvalue_t< int > >::value_type const & x) None
iterator(vector_mvalue_t_int self) SwigPyIterator
pop(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::value_type
pop_back(vector_mvalue_t_int self)
push_back(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::value_type const & x)
rbegin(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::reverse_iterator
rend(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::reverse_iterator
reserve(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::size_type n)
resize(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::size_type new_size)
resize(vector_mvalue_t_int self, std::vector< mvalue_t< int > >::size_type new_size, std::vector< mvalue_t< int > >::value_type const & x) None
size(vector_mvalue_t_int self) std::vector< mvalue_t< int > >::size_type
swap(vector_mvalue_t_int self, vector_mvalue_t_int v)
property thisown

The membership flag

class oalib.vector_mvalue_t_long(*args)

Bases: object

Proxy of C++ std::vector< mvalue_t< long > > class.

append(vector_mvalue_t_long self, mvalue_t_long x)
assign(vector_mvalue_t_long self, std::vector< mvalue_t< long > >::size_type n, mvalue_t_long x)
back(vector_mvalue_t_long self) mvalue_t_long
begin(vector_mvalue_t_long self) std::vector< mvalue_t< long > >::iterator
capacity(vector_mvalue_t_long self) std::vector< mvalue_t< long > >::size_type
clear(vector_mvalue_t_long self)
empty(vector_mvalue_t_long self) bool
end(vector_mvalue_t_long self) std::vector< mvalue_t< long > >::iterator
erase(vector_mvalue_t_long self, std::vector< mvalue_t< long > >::iterator pos) std::vector< mvalue_t< long > >::iterator
erase(vector_mvalue_t_long self, std::vector< mvalue_t< long > >::iterator first, std::vector< mvalue_t< long > >::iterator last) std::vector< mvalue_t< long > >::iterator
front(vector_mvalue_t_long self) mvalue_t_long
get_allocator(vector_mvalue_t_long self) std::vector< mvalue_t< long > >::allocator_type
insert(vector_mvalue_t_long self, std::vector< mvalue_t< long > >::iterator pos, mvalue_t_long x) std::vector< mvalue_t< long > >::iterator
insert(vector_mvalue_t_long self, std::vector< mvalue_t< long > >::iterator pos, std::vector< mvalue_t< long > >::size_type n, mvalue_t_long x) None
iterator(vector_mvalue_t_long self) SwigPyIterator
pop(vector_mvalue_t_long self) mvalue_t_long
pop_back(vector_mvalue_t_long self)
push_back(vector_mvalue_t_long self, mvalue_t_long x)
rbegin(vector_mvalue_t_long self) std::vector< mvalue_t< long > >::reverse_iterator
rend(vector_mvalue_t_long self) std::vector< mvalue_t< long > >::reverse_iterator
reserve(vector_mvalue_t_long self, std::vector< mvalue_t< long > >::size_type n)
resize(vector_mvalue_t_long self, std::vector< mvalue_t< long > >::size_type new_size)
resize(vector_mvalue_t_long self, std::vector< mvalue_t< long > >::size_type new_size, mvalue_t_long x) None
size(vector_mvalue_t_long self) std::vector< mvalue_t< long > >::size_type
swap(vector_mvalue_t_long self, vector_mvalue_t_long v)
property thisown

The membership flag

class oalib.vector_vector_double(*args)

Bases: object

Proxy of C++ std::vector< std::vector< double > > class.

append(vector_vector_double self, doubleVector x)
assign(vector_vector_double self, std::vector< std::vector< double > >::size_type n, doubleVector x)
back(vector_vector_double self) doubleVector
begin(vector_vector_double self) std::vector< std::vector< double > >::iterator
capacity(vector_vector_double self) std::vector< std::vector< double > >::size_type
clear(vector_vector_double self)
empty(vector_vector_double self) bool
end(vector_vector_double self) std::vector< std::vector< double > >::iterator
erase(vector_vector_double self, std::vector< std::vector< double > >::iterator pos) std::vector< std::vector< double > >::iterator
erase(vector_vector_double self, std::vector< std::vector< double > >::iterator first, std::vector< std::vector< double > >::iterator last) std::vector< std::vector< double > >::iterator
front(vector_vector_double self) doubleVector
get_allocator(vector_vector_double self) std::vector< std::vector< double > >::allocator_type
insert(vector_vector_double self, std::vector< std::vector< double > >::iterator pos, doubleVector x) std::vector< std::vector< double > >::iterator
insert(vector_vector_double self, std::vector< std::vector< double > >::iterator pos, std::vector< std::vector< double > >::size_type n, doubleVector x) None
iterator(vector_vector_double self) SwigPyIterator
pop(vector_vector_double self) doubleVector
pop_back(vector_vector_double self)
push_back(vector_vector_double self, doubleVector x)
rbegin(vector_vector_double self) std::vector< std::vector< double > >::reverse_iterator
rend(vector_vector_double self) std::vector< std::vector< double > >::reverse_iterator
reserve(vector_vector_double self, std::vector< std::vector< double > >::size_type n)
resize(vector_vector_double self, std::vector< std::vector< double > >::size_type new_size)
resize(vector_vector_double self, std::vector< std::vector< double > >::size_type new_size, doubleVector x) None
size(vector_vector_double self) std::vector< std::vector< double > >::size_type
swap(vector_vector_double self, vector_vector_double v)
property thisown

The membership flag

oalib.vectorvector2binfile(fname, vals, writeheader, na)

Write a vector of vector elements to binary file

oalib.version() std::string

Print version.

oalib.vstack(column_top, column_bottom)

concatenate two columns

oalib.warning(*args)

Raise warning. In C++ this is a message to stdout. In Python a runtime warning

oalib.writeStatisticsFile(char const * numbersfile, Jcounter jc, int verbose)

write statistics object to disk

oalib.writearrayfile(*args)
Overload 1:

Write a list of arrays to file on disk

Parameters
  • filename (string) – Filename to use

  • arraylist (arraylist_t) – List of arrays to write

  • mode (int, optional) – Mode for the file with designs

  • nrows (int, optional) – If the list of arrays is empty, use this number of rows for the design file

  • ncols (int, optional) – If the list of arrays is empty, use this number of rows for the design file

Return type

int

Returns

Value zero if succesfull


Overload 2:

Write a single array to file


Overload 3:

Write a single array to file

oalib.writebinheader(fid, number_rows, number_columns)

Write header for binary data file