Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  antidiagonal.lean   Sprache: Lean

 

module

public meta import Mathlib.Algebra.Order.Antidiag.Finsupp
public meta import Mathlib.Data.Fin.Tuple.NatAntidiagonal
public meta import Mathlib.Data.Finset.Sort
public meta import Mathlib.Data.Finsupp.Notation

/-!
# Testing computability (and runtime) of antidiagonal
-/


open Finset

section
-- set_option trace.profiler true

-- `antidiagonalTuple` is faster than `finAntidiagonal` by a small constant factor
/-- info: 23426 -/
#guard_msgs in #eval #(finAntidiagonal 4 50)
/-- info: 23426 -/
#guard_msgs in #eval #(Finset.Nat.antidiagonalTuple 4 50)

end

/--
info: {fun₀ | "C" => 3,
 fun₀ | "B" => 1 | "C" => 2,
 fun₀ | "B" => 2 | "C" => 1,
 fun₀ | "B" => 3,
 fun₀ | "A" => 1 | "C" => 2,
 fun₀ | "A" => 1 | "B" => 1 | "C" => 1,
 fun₀ | "A" => 1 | "B" => 2,
 fun₀ | "A" => 2 | "C" => 1,
 fun₀ | "A" => 2 | "B" => 1,
 fun₀ | "A" => 3}
-/

#guard_msgs in
#eval finsuppAntidiag {"A", "B", "C"} 3

Messung
CHZG
909810096

¤ Dauer der Verarbeitung: 0.6 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,068
#Domains=861,803