283{
284
285
286
288 std::string_view fileView { contents };
289
291 while (fileView.size() > 0)
292 {
293 std::string_view thisline =
next_line(fileView);
294
296 {
298
299
300
301
302
303 idenMap = { idenList };
304 continue;
305 }
306
307 if (thisline.size() == 0 or thisline[0] == '#' or thisline[0] == ']')
308 {
309 continue;
310 }
311
314 Fs.push_back(F);
315 }
316 return Fs;
317}
std::vector< BasicPoly > BasicPolyList
bool lineContainsVars(std::string_view &line)
std::string_view next_line(std::string_view &str)
std::vector< std::string > readIdentifierList(const std::string_view line)
void parseBasicPoly(const std::string_view &str, const IdentifierHash &idenHash, BasicPoly &result)
This version is a potentially faster alternative when reading many polynomials.
Standalone, self-contained polynomial representation independent of any engine Ring — coefficients ar...
IdentifierHash: used to facilitate parsing of polynomials from strings and files.