@@ -89,7 +89,29 @@ const filters = view(Inputs.form({
8989``` -->
9090
9191``` js
92- const filters = Inputs .form ()
92+ const algo_filters = view (Inputs .form ({
93+
94+ // branching_capable: Inputs.toggle(
95+ // {
96+ // label: "Capable of branching execution",
97+ // value: false
98+ // }
99+ // ),
100+ acceptable_separability: Inputs .checkbox (
101+ [" fully" , " iterative" , " none" ],
102+ {
103+ label: " Acceptable separability" ,
104+ value: [" fully" ]
105+ }
106+ ),
107+ acceptableCommunicationDirection: Inputs .checkbox (
108+ [" client to aggregator" , " bidirectional" ],
109+ {
110+ label: " Acceptable communication directions" ,
111+ value: [" client to aggregator" ]
112+ }
113+ ),
114+ }));
93115```
94116
95117``` js
@@ -99,6 +121,21 @@ const algorithmList = algorithms.map(
99121 algo .addObservables (observableData);
100122 return algo
101123 }
124+ ).filter (
125+ d => {
126+ // Separability check
127+ if (! algo_filters .acceptable_separability .includes (d .separability )){
128+ return false ;
129+ };
130+ // Branching execution - not relevant until I have examples
131+ // if (d.requiresBranching && !algo_filters.branching_capable){
132+ // return false;
133+ // };
134+ if (! algo_filters .acceptableCommunicationDirection .includes (d .communicationDirection )){
135+ return false ;
136+ };
137+ return true ;
138+ }
102139);
103140
104141const statisticsList = statistics .map (
@@ -110,9 +147,11 @@ const statisticsList = statistics.map(
110147 return stat
111148 }
112149 }
113- );
150+ ). filter ( stat => stat != null ) ;
114151```
115152
153+ There are ${statisticsList.length} compatible statistics, implemented with ${algorithmList.length} total algorithms.
154+
116155``` js
117156html ` ${ statisticsList .map (stat => stat ? stat .display (): " " )} `
118157```
0 commit comments