Tools for testing Jastacry on runtime https://jastacry.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

JCmeasure.cpp 804B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * @file JCmeasure.cpp
  3. * @author Kai KRETSCHMANN
  4. * @copyright SPDX-License-Identifier: MIT
  5. * @brief Main method to start application.
  6. **/
  7. #include <cstdlib>
  8. #include <iostream>
  9. #include <memory>
  10. #include "spdlog/spdlog.h"
  11. #include "MeasureEntropy.h"
  12. using namespace std;
  13. using namespace jastacry;
  14. /**
  15. * @brief Main method.
  16. *
  17. * @param argc [in] - Number of parameters, we expect one means == 2
  18. * @param argv [in] - Array of arguments, first one will be file name.
  19. *
  20. */
  21. int main(int argc, char **argv) {
  22. spdlog::set_level(spdlog::level::debug);
  23. spdlog::info("Measure Jastacry"s);
  24. if(argc != 2) {
  25. spdlog::error("Filename argument missing"s);
  26. return EXIT_FAILURE;
  27. }
  28. string filename = argv[1];
  29. MeasureEntropy m(filename);
  30. m.measure();
  31. m.printResult();
  32. return EXIT_SUCCESS;
  33. }
Social stuff:
Mastodon