From 0dbd053b2c1a93e5ca93554ee2fe5e72ab65a9fa Mon Sep 17 00:00:00 2001 From: Konstantin Sidorov Date: Wed, 7 Jun 2017 12:05:14 +0400 Subject: [PATCH] Fixing Jenkins issue with >80 characters long lines --- src/mlpack/methods/ann/augmented/tasks/add_impl.hpp | 8 ++++++-- src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp | 3 ++- src/mlpack/tests/augmented_rnns_tasks_test.cpp | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mlpack/methods/ann/augmented/tasks/add_impl.hpp b/src/mlpack/methods/ann/augmented/tasks/add_impl.hpp index e4cefd5950..0d37086ed5 100644 --- a/src/mlpack/methods/ann/augmented/tasks/add_impl.hpp +++ b/src/mlpack/methods/ann/augmented/tasks/add_impl.hpp @@ -44,8 +44,12 @@ void AddTask::GenerateData(arma::field& input, // Random uniform length from [2..bitLen] size_t size_A = 2 + std::rand() % (bitLen - 1); size_t size_B = 2 + std::rand() % (bitLen - 1); - // Construct sequence of the form (binary number with size_A bits) + '+' + (binary number with size_B bits) - input(i) = arma::randi(size_A + size_B + 1, arma::distr_param(0, 1)); + // Construct sequence of the form + // (binary number with size_A bits) + '+' + // + (binary number with size_B bits) + input(i) = arma::randi( + size_A + size_B + 1, arma::distr_param(0, 1) + ); input(i).at(size_A) = +100; int val_A = 0; for (size_t k = 0; k < size_A; ++k) { diff --git a/src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp b/src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp index 14cb7ea2bf..8a14e31ab7 100644 --- a/src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp +++ b/src/mlpack/methods/ann/augmented/tasks/sort_impl.hpp @@ -30,7 +30,8 @@ namespace ann /* Artificial Neural Network */ { namespace augmented /* Augmented neural network */ { namespace tasks /* Task utilities for augmented */ { -SortTask::SortTask(size_t maxLength, size_t bitLen) : maxLength(maxLength), bitLen(bitLen) {} +SortTask::SortTask(size_t maxLength, size_t bitLen) + : maxLength(maxLength), bitLen(bitLen) {} void SortTask::GenerateData(arma::field& input, arma::field& labels, diff --git a/src/mlpack/tests/augmented_rnns_tasks_test.cpp b/src/mlpack/tests/augmented_rnns_tasks_test.cpp index 9bcbe62893..4c21a53ae3 100644 --- a/src/mlpack/tests/augmented_rnns_tasks_test.cpp +++ b/src/mlpack/tests/augmented_rnns_tasks_test.cpp @@ -124,7 +124,8 @@ public: auto digit = predictors.at(i); if (digit != 0 && digit != 1) { - // We should not see two separators - we are adding *two* numbers in the task + // We should not see two separators + // since we are adding *two* numbers in the task assert(!num); num = true; }