OpenNN  2.2
Open Neural Networks Library
inputs.cpp
1 /****************************************************************************************************************/
2 /* */
3 /* OpenNN: Open Neural Networks Library */
4 /* www.artelnics.com/opennn */
5 /* */
6 /* I N P U T S C L A S S */
7 /* */
8 /* Roberto Lopez */
9 /* Artelnics - Making intelligent use of data */
11 /* */
12 /****************************************************************************************************************/
13 
14 // OpenNN includes
15 
16 #include "inputs.h"
17 
18 namespace OpenNN
19 {
20 
21 // DEFAULT CONSTRUCTOR
22 
25 
27 {
28  set();
29 }
30 
31 
32 // INPUTS NUMBER CONSTRUCTOR
33 
38 
39 Inputs::Inputs(const size_t& new_inputs_number)
40 {
41  set(new_inputs_number);
42 }
43 
44 
45 // XML CONSTRUCTOR
46 
50 
51 Inputs::Inputs(const tinyxml2::XMLDocument& document)
52 {
53  from_XML(document);
54 }
55 
56 
57 // COPY CONSTRUCTOR
58 
62 
63 Inputs::Inputs(const Inputs& other_inputs)
64 {
65  set(other_inputs);
66 }
67 
68 
69 // DESTRUCTOR
70 
72 
74 {
75 }
76 
77 
78 // ASSIGNMENT OPERATOR
79 
83 
84 Inputs& Inputs::operator = (const Inputs& other_inputs)
85 {
86  if(this != &other_inputs)
87  {
88  items = other_inputs.items;
89 
90  display = other_inputs.display;
91  }
92 
93  return(*this);
94 }
95 
96 
97 // METHODS
98 
99 
100 // EQUAL TO OPERATOR
101 
102 // bool operator == (const Inputs&) const method
103 
108 
109 bool Inputs::operator == (const Inputs& other_inputs) const
110 {
111  if(/*items == other_inputs.items
112  &&*/ display == other_inputs.display)
113  {
114  return(true);
115  }
116  else
117  {
118  return(false);
119  }
120 }
121 
122 
123 // bool is_empty(void) const method
124 
126 
127 bool Inputs::is_empty(void) const
128 {
129  const size_t inputs_number = get_inputs_number();
130 
131  if(inputs_number == 0)
132  {
133  return(true);
134  }
135  else
136  {
137  return(false);
138  }
139 }
140 
141 
142 // Vector<std::string> arrange_names(void) const method
143 
146 
148 {
149  const size_t inputs_number = get_inputs_number();
150 
151  Vector<std::string> names(inputs_number);
152 
153  for(size_t i = 0; i < inputs_number; i++)
154  {
155  names[i] = items[i].name;
156  }
157 
158  return(names);
159 }
160 
161 
162 // const std::string& get_name(const size_t&) const method
163 
167 
168 const std::string& Inputs::get_name(const size_t& i) const
169 {
170  // Control sentence (if debug)
171 
172  #ifndef NDEBUG
173 
174  const size_t inputs_number = get_inputs_number();
175 
176  if(i >= inputs_number)
177  {
178  std::ostringstream buffer;
179 
180  buffer << "OpenNN Exception: Inputs class.\n"
181  << "const std::string get_name(const size_t&) const method.\n"
182  << "Input variable index must be less than number of inputs.\n";
183 
184  throw std::logic_error(buffer.str());
185  }
186 
187  #endif
188 
189  return(items[i].name);
190 }
191 
192 
193 // Vector<std::string> arrange_units(void) const method
194 
197 
199 {
200  const size_t inputs_number = get_inputs_number();
201 
202  Vector<std::string> units(inputs_number);
203 
204  for(size_t i = 0; i < inputs_number; i++)
205  {
206  units[i] = items[i].units;
207  }
208 
209  return(units);
210 }
211 
212 
213 // const std::string& get_unit(const size_t&) const method
214 
218 
219 const std::string& Inputs::get_unit(const size_t& index) const
220 {
221  // Control sentence (if debug)
222 
223  #ifndef NDEBUG
224 
225  const size_t inputs_number = get_inputs_number();
226 
227  if(index >= inputs_number)
228  {
229  std::ostringstream buffer;
230 
231  buffer << "OpenNN Exception: Inputs class.\n"
232  << "const std::string get_unit(const size_t&) const method.\n"
233  << "Index of input variable must be less than number of inputs.\n";
234 
235  throw std::logic_error(buffer.str());
236  }
237 
238  #endif
239 
240  return(items[index].units);
241 }
242 
243 
244 // Vector<std::string> arrange_descriptions(void) const method
245 
248 
250 {
251  const size_t inputs_number = get_inputs_number();
252 
253  Vector<std::string> descriptions(inputs_number);
254 
255  for(size_t i = 0; i < inputs_number; i++)
256  {
257  descriptions[i] = items[i].description;
258  }
259 
260  return(descriptions);
261 }
262 
263 
264 // const std::string get_description(const size_t&) const method
265 
269 
270 const std::string& Inputs::get_description(const size_t& index) const
271 {
272  // Control sentence (if debug)
273 
274  #ifndef NDEBUG
275 
276  const size_t inputs_number = get_inputs_number();
277 
278  if(index >= inputs_number)
279  {
280  std::ostringstream buffer;
281 
282  buffer << "OpenNN Exception: Inputs class.\n"
283  << "const std::string& get_description(const size_t&) const method.\n"
284  << "Index of input variable must be less than number of inputs.\n";
285 
286  throw std::logic_error(buffer.str());
287  }
288 
289  #endif
290 
291  return(items[index].description);
292 }
293 
294 
295 // Matrix<std::string> arrange_information(void) const method
296 
301 
303 {
304  const size_t inputs_number = get_inputs_number();
305 
306  Matrix<std::string> information(inputs_number, 3);
307 
308  for(size_t i = 0; i < inputs_number; i++)
309  {
310  information(i,0) = items[i].name;
311  information(i,1) = items[i].units;
312  information(i,2) = items[i].description;
313  }
314 
315  return(information);
316 }
317 
318 
319 // const bool& get_display(void) const method
320 
323 
324 const bool& Inputs::get_display(void) const
325 {
326  return(display);
327 }
328 
329 
330 // void set(void) method
331 
334 
335 void Inputs::set(void)
336 {
338 
339  set_default();
340 }
341 
342 
343 // void set(const size_t&, const size_t&) method
344 
348 
349 void Inputs::set(const size_t& new_inputs_number)
350 {
351  set_inputs_number(new_inputs_number);
352 
353  set_default();
354 }
355 
356 
357 // void set(const Inputs&) method
358 
361 
362 void Inputs::set(const Inputs& other_inputs)
363 {
364  items = other_inputs.items;
365  display = other_inputs.display;
366 }
367 
368 
369 // void set(const Vector< Vector<std::string> >&) method
370 
379 
380 void Inputs::set(const Vector< Vector<std::string> >& new_inputs_information)
381 {
382  // Control sentence (if debug)
383 
384  #ifndef NDEBUG
385 
386  const size_t new_inputs_information_size = new_inputs_information.size();
387 
388  if(new_inputs_information_size != 3)
389  {
390  std::ostringstream buffer;
391 
392  buffer << "OpenNN Exception: Inputs class.\n"
393  << "void set(const Vector< Vector<std::string> >&) method.\n"
394  << "Size of inputs information must be three.\n";
395 
396  throw std::logic_error(buffer.str());
397  }
398 
399  #endif
400 
401  set_names(new_inputs_information[0]);
402  set_units(new_inputs_information[1]);
403  set_descriptions(new_inputs_information[2]);
404 }
405 
406 
407 // void set_inputs_number(const size_t&) method
408 
411 
412 void Inputs::set_inputs_number(const size_t& new_inputs_number)
413 {
414  items.set(new_inputs_number);
415 }
416 
417 
418 // void set_default(void) method
419 
421 
423 {
424  std::ostringstream buffer;
425 
426  const size_t inputs_number = get_inputs_number();
427 
428  for(size_t i = 0; i < inputs_number; i++)
429  {
430  buffer.str("");
431  buffer << "input_" << i+1;
432 
433  items[i].name = buffer.str();
434  items[i].units = "";
435  items[i].description = "";
436  }
437 
438  set_display(true);
439 }
440 
441 
442 // void set_names(const Vector<std::string>&) method
443 
447 
449 {
450  const size_t inputs_number = get_inputs_number();
451 
452  // Control sentence (if debug)
453 
454  #ifndef NDEBUG
455 
456  const size_t size = new_names.size();
457 
458  if(size != inputs_number)
459  {
460  std::ostringstream buffer;
461 
462  buffer << "OpenNN Exception: Inputs class.\n"
463  << "void set_names(const Vector<std::string>&) method.\n"
464  << "Size of name of input variables vector must be equal to number of inputs.\n";
465 
466  throw std::logic_error(buffer.str());
467  }
468 
469  #endif
470 
471  // Set name of input variables
472 
473  for(size_t i = 0; i < inputs_number; i++)
474  {
475  items[i].name = new_names[i];
476  }
477 }
478 
479 
480 // void set_name(const size_t&, const std::string&) method
481 
486 
487 void Inputs::set_name(const size_t& i, const std::string& new_name)
488 {
489  // Control sentence (if debug)
490 
491  #ifndef NDEBUG
492 
493  const size_t inputs_number = get_inputs_number();
494 
495  if(i >= inputs_number)
496  {
497  std::ostringstream buffer;
498 
499  buffer << "OpenNN Exception: Inputs class.\n"
500  << "void set_name(const size_t&, const std::string&) method.\n"
501  << "Index of input variable must be less than number of inputs.\n";
502 
503  throw std::logic_error(buffer.str());
504  }
505 
506  #endif
507 
508  // Set name of single input variable
509 
510  items[i].name = new_name;
511 }
512 
513 
514 // void set_units(const Vector<std::string>&) method
515 
519 
521 {
522  const size_t inputs_number = get_inputs_number();
523 
524  // Control sentence (if debug)
525 
526  #ifndef NDEBUG
527 
528  const size_t size = new_units.size();
529 
530  if(size != inputs_number)
531  {
532  std::ostringstream buffer;
533 
534  buffer << "OpenNN Exception: Inputs class.\n"
535  << "void set_units(const Vector<std::string>&) method.\n"
536  << "Size must be equal to number of input variables.\n";
537 
538  throw std::logic_error(buffer.str());
539  }
540 
541  #endif
542 
543  // Set units of input variables
544 
545  for(size_t i = 0; i < inputs_number; i++)
546  {
547  items[i].units = new_units[i];
548  }
549 }
550 
551 
552 // void set_unit(const size_t&, const std::string&) method
553 
558 
559 void Inputs::set_unit(const size_t& index, const std::string& new_unit)
560 {
561  // Control sentence (if debug)
562 
563  #ifndef NDEBUG
564 
565  const size_t inputs_number = get_inputs_number();
566 
567  if(index >= inputs_number)
568  {
569  std::ostringstream buffer;
570 
571  buffer << "OpenNN Exception: Inputs class.\n"
572  << "void set_unit(const size_t&, const std::string&) method.\n"
573  << "Index of input must be less than number of inputs.\n";
574 
575  throw std::logic_error(buffer.str());
576  }
577 
578  #endif
579 
580  // Set units of single input variable
581 
582  items[index].units = new_unit;
583 }
584 
585 
586 // void set_descriptions(const Vector<std::string>&) method
587 
591 
592 void Inputs::set_descriptions(const Vector<std::string>& new_descriptions)
593 {
594  const size_t inputs_number = get_inputs_number();
595 
596  // Control sentence (if debug)
597 
598  #ifndef NDEBUG
599 
600  const size_t size = new_descriptions.size();
601 
602  if(size != inputs_number)
603  {
604  std::ostringstream buffer;
605 
606  buffer << "OpenNN Exception: Inputs class.\n"
607  << "void set_descriptions(const Vector<std::string>&) method.\n"
608  << "Size must be equal to number of input variables.\n";
609 
610  throw std::logic_error(buffer.str());
611  }
612 
613  #endif
614 
615  // Set description of input variables
616 
617  for(size_t i = 0; i < inputs_number; i++)
618  {
619  items[i].description = new_descriptions[i];
620  }
621 }
622 
623 
624 // void set_description(const size_t&, const std::string&) method
625 
631 
632 void Inputs::set_description(const size_t& index, const std::string& new_description)
633 {
634  // Control sentence (if debug)
635 
636  #ifndef NDEBUG
637 
638  const size_t inputs_number = get_inputs_number();
639 
640  if(index >= inputs_number)
641  {
642  std::ostringstream buffer;
643 
644  buffer << "OpenNN Exception: Inputs class.\n"
645  << "void set_description(const size_t&, const std::string&) method.\n"
646  << "Index of input variable must be less than number of inputs.\n";
647 
648  throw std::logic_error(buffer.str());
649  }
650 
651  #endif
652 
653  // Set description of single input variable
654 
655  items[index].description = new_description;
656 }
657 
658 
659 // void set_information(const Matrix<std::string>&) method
660 
669 
670 void Inputs::set_information(const Matrix<std::string>& new_information)
671 {
672  // Control sentence (if debug)
673 
674  #ifndef NDEBUG
675 
676  const size_t columns_number = new_information.get_columns_number();
677 
678  if(columns_number != 3)
679  {
680  std::ostringstream buffer;
681 
682  buffer << "OpenNN Exception: Inputs class.\n"
683  << "void set_information(const Matrix<std::string>&) method.\n"
684  << "Number of columns in matrix must be 3.\n";
685 
686  throw std::logic_error(buffer.str());
687  }
688 
689  #endif
690 
691  const size_t inputs_number = get_inputs_number();
692 
693  // Set all information
694 
695  for(size_t i = 0; i < inputs_number; i++)
696  {
697  items[i].name = new_information(i,0);
698  items[i].units = new_information(i,1);
699  items[i].description = new_information(i,2);
700  }
701 }
702 
703 // void set_display(const bool&) method
704 
709 
710 void Inputs::set_display(const bool& new_display)
711 {
712  display = new_display;
713 }
714 
715 
716 // void grow_input(void) method
717 
719 
721 {
722  const Item item;
723 
724  items.push_back(item);
725 }
726 
727 
728 // void prune_input(const size_t&) method
729 
732 
733 void Inputs::prune_input(const size_t& index)
734 {
735  // Control sentence (if debug)
736 
737  #ifndef NDEBUG
738 
739  const size_t inputs_number = get_inputs_number();
740 
741  if(index >= inputs_number)
742  {
743  std::ostringstream buffer;
744 
745  buffer << "OpenNN Exception: Inputs class.\n"
746  << "void prune_input(const size_t&) method.\n"
747  << "Index of input is equal or greater than number of inputs.\n";
748 
749  throw std::logic_error(buffer.str());
750  }
751 
752  #endif
753 
754  items.erase(items.begin()+index);
755 }
756 
757 
758 // Vector<std::string> write_default_names(void) const method
759 
766 
768 {
769  const size_t inputs_number = get_inputs_number();
770 
771  Vector<std::string> default_names(inputs_number);
772 
773  std::ostringstream buffer;
774 
775  for(size_t i = 0; i < inputs_number; i++)
776  {
777  buffer.str("");
778  buffer << "input_" << i+1;
779 
780  default_names[i] = buffer.str();
781  }
782 
783  return(default_names);
784 }
785 
786 
787 // std::string to_string(void) const method
788 
790 
791 std::string Inputs::to_string(void) const
792 {
793  std::ostringstream buffer;
794 
795  const size_t inputs_number = get_inputs_number();
796 
797  buffer << "Inputs\n";
798 
799 
800  for(size_t i = 0; i < inputs_number; i++)
801  {
802  buffer << "Item " << i+1 << ":\n"
803  << "Name:" << items[i].name << "\n"
804  << "Units:" << items[i].units << "\n"
805  << "Description:" << items[i].description << "\n";
806  }
807 
808  buffer << "Display:" << display << "\n";
809 
810  return(buffer.str());
811 }
812 
813 
814 // tinyxml2::XMLDocument* to_XML(void) const method
815 
818 
819 tinyxml2::XMLDocument* Inputs::to_XML(void) const
820 {
821  tinyxml2::XMLDocument* document = new tinyxml2::XMLDocument;
822 
823  const size_t inputs_number = get_inputs_number();
824 
825  std::ostringstream buffer;
826 
827  // Inputs
828 
829  tinyxml2::XMLElement* inputsElement = document->NewElement("Inputs");
830  document->InsertFirstChild(inputsElement);
831 
832  tinyxml2::XMLElement* element = NULL;
833  tinyxml2::XMLText* text = NULL;
834 
835  // Inputs number
836  {
837  element = document->NewElement("InputsNumber");
838  inputsElement->LinkEndChild(element);
839 
840  buffer.str("");
841  buffer << inputs_number;
842 
843  text = document->NewText(buffer.str().c_str());
844  element->LinkEndChild(text);
845  }
846 
847  for(size_t i = 0; i < inputs_number; i++)
848  {
849  element = document->NewElement("Item");
850  element->SetAttribute("Index", (unsigned)i+1);
851  inputsElement->LinkEndChild(element);
852 
853  // Name
854 
855  tinyxml2::XMLElement* name_element = document->NewElement("Name");
856  element->LinkEndChild(name_element);
857 
858  tinyxml2::XMLText* name_text = document->NewText(items[i].name.c_str());
859  name_element->LinkEndChild(name_text);
860 
861  // Units
862 
863  tinyxml2::XMLElement* units_element = document->NewElement("Units");
864  element->LinkEndChild(units_element);
865 
866  tinyxml2::XMLText* units_text = document->NewText(items[i].units.c_str());
867  units_element->LinkEndChild(units_text);
868 
869  // Description
870 
871  tinyxml2::XMLElement* description_element = document->NewElement("Description");
872  element->LinkEndChild(description_element);
873 
874  tinyxml2::XMLText* descriptionText = document->NewText(items[i].description.c_str());
875  description_element->LinkEndChild(descriptionText);
876  }
877 
878  // Display
879  {
880  tinyxml2::XMLElement* display_element = document->NewElement("Display");
881  inputsElement->LinkEndChild(display_element);
882 
883  buffer.str("");
884  buffer << display;
885 
886  tinyxml2::XMLText* display_text = document->NewText(buffer.str().c_str());
887  display_element->LinkEndChild(display_text);
888  }
889 
890  return(document);
891 }
892 
893 
894 // void from_XML(const tinyxml2::XMLDocument&) method
895 
898 
899 void Inputs::from_XML(const tinyxml2::XMLDocument& document)
900 {
901  std::ostringstream buffer;
902 
903  const tinyxml2::XMLElement* inputsElement = document.FirstChildElement("Inputs");
904 
905  if(!inputsElement)
906  {
907  buffer << "OpenNN Exception: Inputs class.\n"
908  << "void from_XML(const tinyxml2::XMLDocument&) method.\n"
909  << "Inputs element is NULL.\n";
910 
911  throw std::logic_error(buffer.str());
912  }
913 
914  // Inputs number
915 
916  const tinyxml2::XMLElement* inputs_number_element = inputsElement->FirstChildElement("InputsNumber");
917 
918  if(!inputs_number_element)
919  {
920  buffer << "OpenNN Exception: Inputs class.\n"
921  << "void from_XML(const tinyxml2::XMLDocument&) method.\n"
922  << "Inputs number element is NULL.\n";
923 
924  throw std::logic_error(buffer.str());
925  }
926 
927  const size_t inputs_number = atoi(inputs_number_element->GetText());
928 
929  set(inputs_number);
930 
931  unsigned index = 0; // size_t does not work
932 
933  const tinyxml2::XMLElement* start_element = inputs_number_element;
934 
935  for(size_t i = 0; i < inputs_number; i++)
936  {
937  const tinyxml2::XMLElement* item_element = start_element->NextSiblingElement("Item");
938  start_element = item_element;
939 
940  if(!item_element)
941  {
942  buffer << "OpenNN Exception: Inputs class.\n"
943  << "void from_XML(const tinyxml2::XMLElement*) method.\n"
944  << "Item " << i+1 << " is NULL.\n";
945 
946  throw std::logic_error(buffer.str());
947  }
948 
949  item_element->QueryUnsignedAttribute("Index", &index);
950 
951  if(index != i+1)
952  {
953  buffer << "OpenNN Exception: Inputs class.\n"
954  << "void from_XML(const tinyxml2::XMLElement*) method.\n"
955  << "Index " << index << " is not correct.\n";
956 
957  throw std::logic_error(buffer.str());
958  }
959 
960  // Name
961 
962  const tinyxml2::XMLElement* name_element = item_element->FirstChildElement("Name");
963 
964  if(!name_element)
965  {
966  buffer << "OpenNN Exception: Inputs class.\n"
967  << "void from_XML(const tinyxml2::XMLElement*) method.\n"
968  << "Pointer to name element is NULL.\n";
969 
970  throw std::logic_error(buffer.str());
971  }
972 
973  if(name_element->GetText())
974  {
975  items[index-1].name = name_element->GetText();
976  }
977 
978  // Units
979 
980  const tinyxml2::XMLElement* units_element = item_element->FirstChildElement("Units");
981 
982  if(!units_element)
983  {
984  buffer << "OpenNN Exception: Inputs class.\n"
985  << "void from_XML(const tinyxml2::XMLElement*) method.\n"
986  << "Pointer to units element is NULL.\n";
987 
988  throw std::logic_error(buffer.str());
989  }
990 
991  if(units_element->GetText())
992  {
993  items[index-1].units = units_element->GetText();
994  }
995 
996  // Description
997 
998  const tinyxml2::XMLElement* description_element = item_element->FirstChildElement("Description");
999 
1000  if(!description_element)
1001  {
1002  buffer << "OpenNN Exception: Inputs class.\n"
1003  << "void from_XML(const tinyxml2::XMLElement*) method.\n"
1004  << "Pointer to description element is NULL.\n";
1005 
1006  throw std::logic_error(buffer.str());
1007  }
1008 
1009  if(description_element->GetText())
1010  {
1011  items[index-1].description = description_element->GetText();
1012  }
1013  }
1014 }
1015 
1016 }
1017 
1018 // OpenNN: Open Neural Networks Library.
1019 // Copyright (c) 2005-2015 Roberto Lopez.
1020 //
1021 // This library is free software; you can redistribute it and/or
1022 // modify it under the terms of the GNU Lesser General Public
1023 // License as published by the Free Software Foundation; either
1024 // version 2.1 of the License, or any later version.
1025 //
1026 // This library is distributed in the hope that it will be useful,
1027 // but WITHOUT ANY WARRANTY; without even the implied warranty of
1028 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1029 // Lesser General Public License for more details.
1030 
1031 // You should have received a copy of the GNU Lesser General Public
1032 // License along with this library; if not, write to the Free Software
1033 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
void set_units(const Vector< std::string > &)
Definition: inputs.cpp:520
void set_descriptions(const Vector< std::string > &)
Definition: inputs.cpp:592
const std::string & get_description(const size_t &) const
Definition: inputs.cpp:270
size_t get_inputs_number(void) const
Returns the number of inputs in the multilayer perceptron.
Definition: inputs.h:103
void set_names(const Vector< std::string > &)
Definition: inputs.cpp:448
virtual void set_default(void)
Sets the members of this object to their default values.
Definition: inputs.cpp:422
Matrix< std::string > arrange_information(void) const
Definition: inputs.cpp:302
virtual ~Inputs(void)
Destructor.
Definition: inputs.cpp:73
void set(void)
Definition: inputs.cpp:335
Vector< std::string > arrange_descriptions(void) const
Definition: inputs.cpp:249
Vector< Item > items
Input variables.
Definition: inputs.h:179
void grow_input(void)
Appends a new item to the inputs.
Definition: inputs.cpp:720
void set_name(const size_t &, const std::string &)
Definition: inputs.cpp:487
Inputs(void)
Definition: inputs.cpp:26
const size_t & get_columns_number(void) const
Returns the number of columns in the matrix.
Definition: matrix.h:1090
std::string to_string(void) const
Returns a string representation of the current inputs object.
Definition: inputs.cpp:791
virtual void from_XML(const tinyxml2::XMLDocument &)
Definition: inputs.cpp:899
virtual tinyxml2::XMLDocument * to_XML(void) const
Definition: inputs.cpp:819
void set_information(const Matrix< std::string > &)
Definition: inputs.cpp:670
const std::string & get_unit(const size_t &) const
Definition: inputs.cpp:219
bool display
Display messages to screen.
Definition: inputs.h:183
const bool & get_display(void) const
Definition: inputs.cpp:324
bool operator==(const Inputs &) const
Definition: inputs.cpp:109
Inputs & operator=(const Inputs &)
Definition: inputs.cpp:84
Vector< std::string > arrange_units(void) const
Definition: inputs.cpp:198
Vector< std::string > arrange_names(void) const
Definition: inputs.cpp:147
void set_display(const bool &)
Definition: inputs.cpp:710
void set_unit(const size_t &, const std::string &)
Definition: inputs.cpp:559
void set_description(const size_t &, const std::string &)
Definition: inputs.cpp:632
void set_inputs_number(const size_t &)
Definition: inputs.cpp:412
bool is_empty(void) const
Returns true if the number of inputs is zero, and false otherwise.
Definition: inputs.cpp:127
void prune_input(const size_t &)
Definition: inputs.cpp:733
Vector< std::string > write_default_names(void) const
Definition: inputs.cpp:767
const std::string & get_name(const size_t &) const
Definition: inputs.cpp:168