Jump to content

Featured Replies

Posted

Dear All, 

Happy New Year

I´m back to a lot of work with sets, subsets and supersets and I have an idea/suggestion:

 

When evaluating this

(pcs-super-sets 7 (pcs '3-1) :forte)

I get this result

(7-1 7-2 7-2b 7-3 7-3b 7-4 7-4b 7-5 7-5b 7-6 7-6b 7-7 7-7b 7-8 7-9 7-9b 7-10 7-10b 7-11 7-11b 7-z12 7-13 7-13b 7-14 7-14b 7-15 7-16 7-16b 7-z17 7-z18 7-z18b 7-19 7-19b 7-20 7-20b 7-21 7-21b 7-22 7-23 7-23b 7-24 7-24b 7-25 7-25b 7-26 7-26b 7-27 7-27b 7-28 7-28b 7-29 7-29b 7-30 7-30b 7-33 7-z36 7-z36b 7-z37 7-z38 7-z38b)

These are all the supersets of cardinality 7 of the 3-1 set.

Would be very nice in this context to have a keyword to invert the result, i.e., actually showing the excluded sets, like all the sets that ARE NOT supersets of the 3-1 set.

Like inverting, like a (pcs-non-super-sets) function. I think that maybe it´s not so difficult, because the algorythm of the function already give the result, the only thing necessary is that the function return exactly the opposite result.

 

Best,

Julio

 

  • Author

A more specific example

(pcs-super-sets 4 (pcs '3-1) :forte)
;; (4-1 4-2 4-2b 4-4 4-4b 4-5 4-5b 4-6)

(pcs-super-sets 4 (pcs '3-1) :forte :complementary)
;; (all other 4 note sets, except 4-1 4-2 4-2b 4-4 4-4b 4-5 4-5b 4-6)

Best,

Julio

(let ((out (pcs-cardinal 4 :forte)))
  (loop for i in (pcs-super-sets 4 (pcs '3-1) :forte)
    do (setf out (remove i out))
    finally (return out)))
(let ((rem (pcs-cardinal 7 :forte))
      (super (pcs-super-sets 7 (pcs '3-1) :forte)))
  (loop for i in super
    do (setf rem (remove i rem))
    finally (return rem)))
=> (7-31 7-31b 7-32 7-32b 7-34 7-35)

here it is.

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy