options | type | BITS(Base=String,...
BITS(Base=Num,... BITS(Base=Array,... |
Base= ... must be first keyword, RowsColsBits must follow if used. |
Base | txt | Base=String | LEN(String) tokens, default 8 bit. Use RowsColsBits to change defaults. |
num | Base=Num | Num is a 1 token numerical scalar, 64 bit max | |
Base=Array | Array is a numeric vector or a matrix. Base is divided in LEN(Array) tokens, 64 bit max | ||
RowsColsBits | num | B=Array, RCB=nBits,... | nBits<64. This reduces the default 64 bit per token to nBits per token. nBits=52 is the maximum number of bits that can be used without loss of precision outside the BITS function (standard HicEst variables are 64 bit floating point numbers with a 11 bit exponent and 1 sign bit). |
B=Array, RCB=n... | Array with rows*columns tokens, only the lowest n bits of each token are used. | ||
B=String, RCB=b,... | a single token String with b addressable bits
| ||
B=String, RCB=(c,b)... | String divided in c tokens, b bit each (b rounded up to multiple of 8) | ||
B=String, RCB=(r,c,b)... | String with r*c tokens (rows*columns), b bit each (b rounded up to multiple of 8) |
options | type | code snippet |
options to select parts of Base for following actions |
X | num | ...X=columnNr... | selects columnNr for all selected rows (String or Array). If no rows are selected: the following operations work on all rows |
...X=(colA, colZ)... | selects the range of columns colA to colZ of String or Array. | ||
Y | num | ...Y=rowNr ... | selects rowNr for all columns selected (String or Array). If no columnss are selected: the following operations work on all columns |
...Y=(rowA, rowZ)... | selects the range of rows rowA to rowZ of String or Array. | ||
BoxDim | num | ...BD=(br,bc)... | divides Base in equal size boxes of br rows * bc columns. Boxes are aligned left to right in RCB space and top to bottom. Boxes are not broken. |
BOX | num | ..BOX=n... | selects the n-th box of a box-grid defined by BoxDim=... |
...BOX=(bA,bZ)... | selects the range of boxes bA to bZ . | ||
RING | num | ...RING=r... | selects the r-nearest neighbors of token(r,c) instead of token(r,c) itself.
|
JumpBase | num | ...JB=1000... | start at linearPosition 1000 of base NumOrTxt |
...jb=(2,3)... | start at RowColPosition (2,3) of base NumOrTxt | ||
ORIGin | num | ...orig = 0... | set the index origin of row, col, bit, box, ring. Default is = 1. |
options | type | b either scalar or range=(from,to) |
Conditional execution: if TRUE execute NEXT option,
ELSE skip next option |
IFSet | num | ...IFS=b... | execute next option only if current baseToken BIT b set
|
IFClr | num | ...IFC=b... | execute next option only if current baseToken BIT b not set
|
IFLt | num | ...IFL=b... | execute next option only if current baseToken VALUE is less than b
|
IFEq | num | ...IFE=b... | execute next option only if current baseToken VALUE is equal to b
|
IFNeq | num | ...IFN=b... | execute next option only if current baseToken VALUE is not equal to b
|
IFGt | num | ...IFG=b... | execute next option only if current baseToken VALUE is greater than b
|
IFLOC | num | ...IFLOC=b... | execute next option only if current baseToken LOCATION is equal to b
|
options | type | code snippet |
options to change selected tokens of Base |
CLR | num | ...CLR=b ... | clear bits b
|
...CLR=(a,z)... | clear bits in range a to z to 0 | ||
...CLR... | set tokens to 0 (clear all bits) | ||
FLiP | num | ...FLP= n... | flip bits n
|
...FLP=(a,z)... | flip bits in range a to z | ||
...FLP... | flip all bits | ||
SetBit | num | ...SB=n ... | set bits n to 1
|
...SB=(a,z)... | set bits in range a to z | ||
...SB... | set all bits in all selected tokens to 1 | ||
SetVal | num | ...SV=n... | set selected token values to n |
...SV='A'... | set selected token values to 'A'
| ||
POOL | num txt | ...POOL=XY... |
|
AND | num | ...AND=n... | bitwise AND: BaseValue = BaseValue AND n
|
EOR | num | ...EOR=n... | bitwise exclusive EOR: BaseValue = BaseValue EOR n
|
OR | num | ...OR=n... | bitwise OR: BaseValue = BaseValue OR n
|
CoPy | num | ...CP=dX... | copy tokens by linear displacement dx ! same as txt(3-1) = txt(3) |
...CP=(dX,dY)... | copy tokens by dX columns and dY rows.
| ||
MoVe | num | ...MV=dX... | move tokens by dX columns.
|
...MV=(dX,dY)... | move tokens by dX columns and dY rows.
| ||
SHiFt | num | ...SHF=b... | shift Base left (b>0) or right (b<0) bits
|
ROTate | num | ...ROT=b... | rotate Base left (b>0) or right (b<0) bits
|
XLate | txt | ...XL="bin:txt, bin:txt"... | translate binary characters to (readable) txt |
options | type | code snippet |
options that will receive a value |
GetVal | num | ...GV=x... | x is to get the token value
|
txt | ...GV=txt... | txt is to get the token value
| |
| |||
BitCount | num | ...BC=x... | x gets the total number of bits in base
|
txt | ...BC=txt... | txt(i) gets bitcount of baseToken(i)
| |
...RING=r, BC=txt... | txt(i) gets sum of bitcounts of ring tokens around baseToken i | ||
vector | ...BC=vec... | vector gets bitcount of baseToken i | |
...RING=r, BC=vec... | vec(i) gets bitcount of ring token aroung baseToken i | ||
matrix | ...BOX=b, BC=mtx... | mtx(b, element_j) gets the occurence count of element == j in box b | |
Low0 | num | ...L0= posLowZero... | posLowZero is the lowest position of a 0 in base
|
High0 | num | ...H0=posHighZero... | posHighZero is the highest position of a 1 in base
|
Low1 | num | ...L1=posLowOne... | posLowOne is the lowest position of a 1 in base
|
High1 | num | ...L1=posHighOne... | posHighOne is the highest position of a 1 in base
|
LocGet | num | ...LG=TokenPos... | TokenPos is the current token number in base
|
ERROR | label | ...ERR=999,... | On error branch to the error label. Error messages are not shown) |