#] #] ********************* #] "$d_Qtest"'types nested/types nested- develop.txt' - # www.BillHowell.ca 23Mar2024 initial # slc - "[all-full-but-[one or none]]" INDEX of an array # sub - is a sequence of items at the top level of an array, note that a sub can span [one, more, all] axis # not much use for a separate subSlc of an array - just use sub optrs # [remove, insert] - require slc of an array, often built from search for a subAry, # inset something in non-sub parts of slc # split - requires a hyper-plane index as a specific place to split ary # replace - just a sub required if [old, new] of same shape. If not, won't work in general # 24************************24 # Table of Contents, generated with : # $ grep "^#]" "$d_Qtest"'types nested/types nested- develop.txt' | sed 's/^#\]/ /' >"$d_Qtest"'types nested/types nested- develop TblOfContents.txt' # ********************* 24************************24 #] current status of tests - see "$d_Qtest"'/test results/' 23Mar2024 huge number of tests to create!! 24************************24 08********08 #] ??Apr2024 08********08 #] ??Apr2024 08********08 #] ??Apr2024 08********08 #] ??Apr2024 08********08 #] ??Apr2024 08********08 #] ??Apr2024 08********08 #] 09Apr2024 isLayNdxStr 0fix, test] iterate wow - was hard. working, but problems are likely with tougher tests big issue - converts int to [int], if only int in ndxStr then [[int]] check : redo isTypNdxInt 0> ndxInt_to_ndxStr_chk_testSimple log.txt 08********08 #] 08Apr2024 isLayNrySub - removed, doesn't make sense to do this, just use ndx1st +-----+ olde code IF flag_debug THEN write 'loading isLayNrySub' ; ENDIF ; # isLayNrySub IS OP nry sub - check [val, shp] compatible [nry, sub], doesn't check posnFit # removed: this op doesn't make sense? ndx1st is real way to do it # 19Mar2024 [cp, adapt] from types.ndf # 08Apr2024 revamp to see if sub fits in at least one part of nry, search in depth # must first find ndx1stL, then check those 07Apr2024 t isLayNrySub IS OP nry sub { LOCAL faultL idx nrySub ; faultL := isLayNry nry ; faultL := link faultL (isLayNry sub) ; IF (= null faultL) THEN nrySub := nry ; ????? IF (~= (EACH valence nry sub)) THEN faultL := fault '?isLayNrySubVlc' ; ELSEIF (OR (EACHBOTH > (EACH (gage shape) sub nry))) THEN faultL := fault '?isLayNrySubShp' ; ENDIF ; ENDIF ; faultL } # fault codes (can't have apos! use quotes). : #? isLayNrySub ?isLayNrySubVlc (~= (EACH valence nry sub)) #? isLayNrySub ?isLayNrySubShp (OR (EACHBOTH > (EACH (gage shape) sub nry))) 08********08 #] 08Apr2024 re-[name, vamp] tests I ripped out tstStandards, revamped tests change : isLayNryNdx IS OP nry ndx { LOCAL faultL ; faultL := isLayNry nry ; IF (NOT isTypIntL ndx) THEN faultL := link faultL (fault '?isLayNryNdxNotIntL') ; ENDIF ; IF (= null faultL) THEN IF ((valence nry) ~= (gage shape ndx)) THEN faultL := link faultL (fault '?isLayNryNdxValShp') ; ENDIF ; ENDIF ; faultL } to : isLayNryNdx IS OP nry ndx { LOCAL faultL ; faultL := isLayNry nry ; IF (NOT isTypIntL ndx) THEN faultL := link faultL (fault '?isLayNryNdxNotIntL') ; ENDIF ; faultL } now changeBack to (changes will still be made sfter copying to 'types nested.ndf' : % must do as descend depth of nry - path selects different content ! isLayNryNdx IS OP nry ndx { LOCAL faultL ; faultL := isLayNry nry ; faultL := link faultL (isTypNdxInt ndx) ; IF (= null faultL) THEN IF ((valence nry) ~= (gage shape ndx)) THEN faultL := link faultL (fault '?isLayNryNdxValShp') ; ENDIF ; ENDIF ; faultL } 08Apr2024 ndx[Int, Str] should BOTH be allowed for [most, all]? nry ops! 08Apr2024 nry - still haven't implemented nryPhr!! qnial> tstOptr "isLayNryNdx_testSimple o ?isLayNryNdx_testSimple error : unknown tstTypPhr 0 1 1 >> oops +--+--------+---+---------------+ | o|025_intA| |?isLayNryNdxNot| +--+--------+---+---------------+ >> why this error? qnial> tstOptr "isLayNryNdx_testSimple l isLayNryNdx_testSimple 6 1 6 >> works, just have a problem with an unwanted flag_break +-----+ olde code nryVlc idxVlc := EACH valence nry ndx ; nryShp idxShp := EACH (gage shape) nry ndx ; % ; IF (~= 1 idxVlc) THEN faultL := link faultL (fault '?isAryNdxVlc') ; ENDIF ; IF ((valence nry) ~= (gage shape ndx)) THEN faultL := link faultL (fault '?isLayNryNdxValShp') ; ENDIF ; % ; IF (~= (EACH (gage shape) ndx)) THEN faultL := link faultL (fault '?isAryNdxMisShp') ; ENDIF ; % ; IF (= null faultL) THEN axiNdxL := sortup cull (link ndx) ; % list idxs by axis ; axiNdxMaxL := EACH max (cols mix ndx) ; % all idx are positive ; IF (NAND (0 EACHRIGHT <= axiNdxL)) THEN faultL := fault '?isAryNdxNegtv' ; ENDIF ; % fit between nry & ndx - each idx within upper bounds ; IF (OR (nryShp EACHBOTH <= axiNdxMaxL)) THEN faultL := fault '?isAryNdxBig' ; ENDIF ; ENDIF ; # 08Mar2024 tests qnial> ndxInt := (1 0 0) (1 0 1) (1 0 2) (1 0 3) +-----+-----+-----+-----+ |1 0 0|1 0 1|1 0 2|1 0 3| +-----+-----+-----+-----+ qnial> cols mix ndxInt +-------+-------+-------+ |1 1 1 1|0 0 0 0|0 1 2 3| +-------+-------+-------+ qnial> EACH max (cols mix ndxInt) 1 0 3 trashed nry_sub_get_ndx1stL_chk_testStd I don't want tstStandard anymore - hard to look up data 08********08 #] 23Mar2024 created [dir, fil]s 'types nested' # enddoc