(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



(* ::Input::Initialization:: *)
SetDirectory@"C:\\drorbn\\AcademicPensieve\\Projects\\OU";
<< "OU-Programs.m"


(* ::Input::Initialization:: *)
CVD[vd_VD]:=((CVD@@vd)/.{_EOS->Sequence[],Subscript[X, s_][i_,j_]:>Sequence[s i,j]});
AllBs[n_,m_]:=DeleteDuplicatesBy[CVD@*\!\(\*OverscriptBox[\(\[CapitalGamma]\), \(_\)]\)]@Flatten@Table[b, {k,0,m},{b,ProudBs[n,k]}]


(* ::Input::Initialization:: *)
SaveList[n_,m_]:=Module[{fname, Bs,t, c},
fname="Data/B_"<>ToString[n]<>"_"<>ToString[m]<>".m";
If[FileType[fname]===File, Bs=Get[fname]; t="Cached",
t=First@Timing[Bs=Select[AllBs[n,m], (Length[#[[2]]]==m)&]];
Echo@"Saving...";
Put[Bs, fname]
];
c=Length[Bs];
Echo[{n,m}->{t,c}];
c
];



