Documentation

Aesop.Util.UnorderedArraySet

structure Aesop.UnorderedArraySet (α : Type u_1) [BEq α] :
Type u_1
Instances For
    instance Aesop.instInhabitedUnorderedArraySet {a✝ : Type u_1} {a✝¹ : BEq a✝} :
    Equations
    • Aesop.instInhabitedUnorderedArraySet = { default := { rep := default } }

    O(1)

    Equations
    • Aesop.UnorderedArraySet.empty = { rep := #[] }
    Instances For
      Equations
      • Aesop.UnorderedArraySet.instEmptyCollection = { emptyCollection := Aesop.UnorderedArraySet.empty }

      O(1)

      Equations
      Instances For

        O(n)

        Equations
        Instances For

          Precondition: xs contains no duplicates.

          Equations
          Instances For

            Precondition: xs is sorted.

            Equations
            Instances For
              def Aesop.UnorderedArraySet.ofArray {α : Type u_1} [BEq α] [ord : Ord α] (xs : Array α) :

              O(n*log(n))

              Equations
              Instances For
                Equations
                Instances For
                  Equations
                  Instances For
                    Equations
                    Instances For

                      O(n)

                      Equations
                      Instances For
                        def Aesop.UnorderedArraySet.filterM {α : Type} [BEq α] {m : TypeType u_1} [Monad m] (p : αm Bool) (s : Aesop.UnorderedArraySet α) :

                        O(n)

                        Equations
                        Instances For

                          O(n*m)

                          Equations
                          Instances For
                            Equations
                            • Aesop.UnorderedArraySet.instAppend = { append := Aesop.UnorderedArraySet.merge }

                            O(n)

                            Equations
                            Instances For
                              def Aesop.UnorderedArraySet.foldM {α : Type u_1} [BEq α] {m : Type u_2 → Type u_3} {σ : Type u_2} [Monad m] (f : σαm σ) (init : σ) (s : Aesop.UnorderedArraySet α) :
                              m σ

                              O(n)

                              Equations
                              Instances For
                                instance Aesop.UnorderedArraySet.instForIn {α : Type u_1} [BEq α] {m : Type u_2 → Type u_3} :
                                Equations
                                def Aesop.UnorderedArraySet.fold {α : Type u_1} [BEq α] {σ : Type u_2} (f : σασ) (init : σ) (s : Aesop.UnorderedArraySet α) :
                                σ

                                O(n)

                                Equations
                                Instances For
                                  Equations
                                  Instances For

                                    O(1)

                                    Equations
                                    Instances For

                                      O(1)

                                      Equations
                                      Instances For
                                        def Aesop.UnorderedArraySet.anyM {α : Type u_1} [BEq α] {m : TypeType u_2} [Monad m] (p : αm Bool) (s : Aesop.UnorderedArraySet α) (start : Nat := 0) (stop : Nat := s.size) :

                                        O(n)

                                        Equations
                                        Instances For
                                          def Aesop.UnorderedArraySet.any {α : Type u_1} [BEq α] (p : αBool) (s : Aesop.UnorderedArraySet α) (start : Nat := 0) (stop : Nat := s.size) :

                                          O(n)

                                          Equations
                                          Instances For
                                            def Aesop.UnorderedArraySet.allM {α : Type u_1} [BEq α] {m : TypeType u_2} [Monad m] (p : αm Bool) (s : Aesop.UnorderedArraySet α) (start : Nat := 0) (stop : Nat := s.size) :

                                            O(n)

                                            Equations
                                            Instances For
                                              def Aesop.UnorderedArraySet.all {α : Type u_1} [BEq α] (p : αBool) (s : Aesop.UnorderedArraySet α) (start : Nat := 0) (stop : Nat := s.size) :

                                              O(n)

                                              Equations
                                              Instances For
                                                Equations
                                                Equations
                                                Equations