linmeric 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/Rakefile +31 -0
  4. data/bin/linmeric +6 -3
  5. data/doc/Archive.html +3 -2
  6. data/doc/Calculator.html +2 -1
  7. data/doc/Calculator/Evaluator.html +3 -2
  8. data/doc/Calculator/Lexer.html +3 -2
  9. data/doc/Calculator/Token.html +3 -2
  10. data/doc/Dim.html +6 -5
  11. data/doc/Filename.html +5 -4
  12. data/doc/Fixnum.html +13 -152
  13. data/doc/Float.html +6 -5
  14. data/doc/Function.html +3 -2
  15. data/doc/InputError.html +2 -1
  16. data/doc/IntNum.html +249 -0
  17. data/doc/Integer.html +114 -0
  18. data/doc/Integrators.html +2 -1
  19. data/doc/LU.html +2 -1
  20. data/doc/Lexer.html +3 -2
  21. data/doc/Linmeric.html +2 -1
  22. data/doc/Listener.html +3 -2
  23. data/doc/Matrix.html +37 -36
  24. data/doc/MyArgError.html +2 -1
  25. data/doc/NilClass.html +5 -4
  26. data/doc/Numeric.html +6 -5
  27. data/doc/Object.html +117 -0
  28. data/doc/Parser.html +9 -8
  29. data/doc/PrintError.html +2 -1
  30. data/doc/README_md.html +16 -14
  31. data/doc/Scp.html +3 -2
  32. data/doc/Sizer.html +9 -5
  33. data/doc/String.html +12 -11
  34. data/doc/Token.html +3 -2
  35. data/doc/Tool.html +2 -1
  36. data/doc/created.rid +18 -18
  37. data/doc/css/fonts.css +6 -6
  38. data/doc/index.html +22 -14
  39. data/doc/js/darkfish.js +7 -7
  40. data/doc/js/jquery.js +4 -9404
  41. data/doc/js/navigation.js.gz +0 -0
  42. data/doc/js/search_index.js +1 -1
  43. data/doc/js/search_index.js.gz +0 -0
  44. data/doc/js/searcher.js +3 -2
  45. data/doc/js/searcher.js.gz +0 -0
  46. data/doc/table_of_contents.html +23 -13
  47. data/lib/linmeric/CnGal_Matrix_class.rb +11 -5
  48. data/lib/linmeric/CnGal_new_classes.rb +14 -2
  49. data/lib/linmeric/Parser.rb +6 -6
  50. data/lib/linmeric/Sizer.rb +3 -0
  51. data/lib/linmeric/version.rb +1 -1
  52. data/lib/linmeric_bin.rb +2 -1
  53. metadata +9 -6
  54. data/doc/Instructions_en.txt +0 -207
  55. data/doc/Instructions_it.txt +0 -211
Binary file
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["archive","calculator","evaluator","lexer","token","dim","filename","fixnum","float","function","inputerror","integrators","lu","lexer","linmeric","listener","matrix","myargerror","nilclass","numeric","parser","printerror","scp","sizer","string","token","tool","!=()","*()","**()","+()","-()","-()","/()","==()","l()","u()","[]()","[]=()","analyze()","attribute()","balanced_brackets?()","balanced_brackets?()","boole()","can_divide?()","can_divide?()","can_divide?()","can_divide?()","can_multiply?()","can_multiply?()","can_multiply?()","can_multiply?()","check_block()","clear_line()","coerce()","collect_single_key()","compact()","contain?()","contain_all?()","convert()","count()","count()","current_tk()","cursor_to()","default()","del_rwcl()","discard()","dx()","evaluate()","export()","extract()","extract()","extract_gen_exp()","f()","factorize()","float?()","from_file()","getcls()","getrws()","gets()","identity()","insert_b()","integer?()","integrate()","is_a?()","is_exp?()","is_keyword?()","is_similar?()","is_squared?()","keys()","laplace()","letters()","make_op()","me()","midpoint()","missing()","missing_expression_after_equal()","missing_general_string()","missing_integ_range()","missmatch()","name()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","next_()","no_final_quotes()","norm()","numpoint_missing()","number?()","ok?()","operators()","parse()","parse()","position()","previous()","print()","print_stack()","priority()","read_char()","reduced()","remove()","reset()","reset()","reset()","rettdx()","rettsx()","scopify()","similar_to?()","similar_to?()","similar_to?()","simpson()","size()","solve()","solve()","state0_1()","state2()","store()","swap()","sx()","tag()","to_block()","to_file()","to_n()","to_s()","to_s()","to_s()","to_s()","tokenize()","tokenize()","tokenize()","top()","tr()","translate()","trapezi()","unexpected_token_in_solve()","unknown()","update()","value()","vars()","readme"],"longSearchIndex":["archive","calculator","calculator::evaluator","calculator::lexer","calculator::token","dim","filename","fixnum","float","function","inputerror","integrators","lu","lexer","linmeric","listener","matrix","myargerror","nilclass","numeric","parser","printerror","scp","sizer","string","token","tool","matrix#!=()","matrix#*()","matrix#**()","matrix#+()","matrix#-()","string#-()","matrix#/()","matrix#==()","lu::l()","lu::u()","matrix#[]()","matrix#[]=()","sizer#analyze()","token#attribute()","function#balanced_brackets?()","sizer#balanced_brackets?()","integrators::boole()","fixnum#can_divide?()","float#can_divide?()","matrix#can_divide?()","numeric#can_divide?()","fixnum#can_multiply?()","float#can_multiply?()","matrix#can_multiply?()","numeric#can_multiply?()","sizer#check_block()","listener#clear_line()","matrix#coerce()","listener#collect_single_key()","string#compact()","string#contain?()","string#contain_all?()","function#convert()","scp#count()","sizer#count()","calculator::evaluator#current_tk()","listener#cursor_to()","printerror::default()","matrix#del_rwcl()","scp#discard()","dim#dx()","calculator::evaluator#evaluate()","matrix#export()","parser#extract()","scp#extract()","lexer#extract_gen_exp()","tool::f()","lu::factorize()","string#float?()","matrix::from_file()","matrix#getcls()","matrix#getrws()","listener#gets()","matrix::identity()","scp#insert_b()","string#integer?()","function#integrate()","filename#is_a?()","tool::is_exp?()","tool::is_keyword?()","numeric#is_similar?()","matrix#is_squared?()","tool::keys()","matrix#laplace()","tool::letters()","calculator::evaluator#make_op()","token#me()","integrators::midpoint()","printerror::missing()","printerror::missing_expression_after_equal()","printerror::missing_general_string()","printerror::missing_integ_range()","printerror::missmatch()","filename#name()","archive::new()","calculator::token::new()","dim::new()","function::new()","listener::new()","matrix::new()","parser::new()","scp::new()","sizer::new()","token::new()","archive#next_()","printerror::no_final_quotes()","matrix#norm()","printerror::numpoint_missing()","string#number?()","function#ok?()","tool::operators()","calculator::evaluator#parse()","parser#parse()","token#position()","archive#previous()","printerror::print()","tool::print_stack()","calculator::evaluator#priority()","listener#read_char()","printerror::reduced()","string#remove()","lu::reset()","listener#reset()","parser#reset()","integrators::rettdx()","integrators::rettsx()","scp#scopify()","fixnum#similar_to?()","float#similar_to?()","matrix#similar_to?()","integrators::simpson()","nilclass#size()","calculator::solve()","lu::solve()","calculator::evaluator#state0_1()","calculator::evaluator#state2()","archive#store()","lu::swap()","dim#sx()","calculator::token#tag()","function#to_block()","matrix#to_file()","string#to_n()","filename#to_s()","function#to_s()","matrix#to_s()","nilclass#to_s()","calculator::lexer#tokenize()","function#tokenize()","lexer#tokenize()","archive#top()","matrix#tr()","function#translate()","integrators::trapezi()","printerror::unexpected_token_in_solve()","printerror::unknown()","matrix#update()","calculator::token#value()","function#vars()",""],"info":[["Archive","","Archive.html","","<p>This class provides a useful object to store the command history of\nlinmeric\n<p>Author &mdash; Massimiliano Dal …\n"],["Calculator","","Calculator.html","","<p>This file contains a simple expression evaluator to convert math binary\noperations in a result. It is …\n"],["Calculator::Evaluator","","Calculator/Evaluator.html","","<p>Evaluator parses and evaluates at the same time the stream of tokens\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com …\n"],["Calculator::Lexer","","Calculator/Lexer.html","","<p>This lexser creates the tokens splitting the input string according to the\noperators (OP =&gt; see Calculator …\n"],["Calculator::Token","","Calculator/Token.html","","<p>Definition of a simple token with an attribute (@tag) and a value (@val)\n<p>Author &mdash; Massimiliano Dal Mas ( …\n"],["Dim","","Dim.html","","<p>Definition of a dimension (structure: from-to)\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License … &mdash; "],["Filename","","Filename.html","","<p>Defining a subclass of string to identify a fileneme\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com …\n"],["Fixnum","","Fixnum.html","","<p>Overload of Fixnum class\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under …\n"],["Float","","Float.html","","<p>Overload of Float class\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under …\n"],["Function","","Function.html","","<p>This class provides a simple representation of a function and some method\nto manipulate it\n<p>Author &mdash; Massimiliano …\n"],["InputError","","InputError.html","",""],["Integrators","","Integrators.html","","<p>This module provides some method to integrate a function\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com …\n"],["LU","","LU.html","","<p>This module provides some method to perform LU factorization on squared\nmatrices.\n<p>Author &mdash; Massimiliano …\n"],["Lexer","","Lexer.html","","<p>This simple Lexer tokenizes the input stream of commands for the sintax\nanalyzer\n<p>Author &mdash; Massimiliano …\n"],["Linmeric","","Linmeric.html","",""],["Listener","","Listener.html","","<p>This class works on the command line interface to allow the user to move\nthe cursor, modify the input …\n"],["Matrix","","Matrix.html","","<p>This class provides a simple representation of a matrix with the main\nfeatures, operations and some useful …\n"],["MyArgError","","MyArgError.html","",""],["NilClass","","NilClass.html","","<p>Overload of NilClass\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under MIT …\n"],["Numeric","","Numeric.html","","<p>Overload of Numeric class\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under …\n"],["Parser","","Parser.html","","<p>This is a stack-based parser that returns a tree in array format. Sub\narrays are operations with higher …\n"],["PrintError","","PrintError.html","","<p>This modue provides a set of error messages for linmeric\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com …\n"],["Scp","","Scp.html","","<p>This class manipulates a string representing an algebric expression\nunderlining the higher priority operations …\n"],["Sizer","","Sizer.html","","<p>Sizer analyzes the sintax of the inserted commands printing errors if they\nare found, before the string …\n"],["String","","String.html","","<p>Overload of String class\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under …\n"],["Token","","Token.html","","<p>This class generates a token object with three parameters:\n<p>Attribute\n<p>Position\n"],["Tool","","Tool.html","","<p>Provides some useful procedure for linmeric\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License … &mdash; "],["!=","Matrix","Matrix.html#method-i-21-3D","(obj)","<p>Checks if this matrix is different from another object\n<p>*<strong>argument</strong>*: `Object` to be compared with\n<p>*<strong>returns</strong> …\n"],["*","Matrix","Matrix.html#method-i-2A","(ob)","<p>Multiplies the current matrix to another\n<p>*<strong>argument</strong>*: `Matrix` to be multiplied to\n<p>*<strong>returns</strong>*: `Matrix` object …\n"],["**","Matrix","Matrix.html#method-i-2A-2A","(obj)","<p>Elevates each element of the current matrix to a `Numeric` exponent\n<p>*<strong>argument</strong>*: `Numeric`\n<p>*<strong>returns</strong>*: `Matrix` …\n"],["+","Matrix","Matrix.html#method-i-2B","(m)","<p>Sums the current matrix to another\n<p>*<strong>argument</strong>*: `Matrix` to be summed to\n<p>*<strong>returns</strong>*: `Matrix` object\n"],["-","Matrix","Matrix.html#method-i-2D","(m)","<p>Subtracts the current matrix to another\n<p>*<strong>argument</strong>*: `Matrix` to be subtracted to\n<p>*<strong>returns</strong>*: `Matrix` object …\n"],["-","String","String.html#method-i-2D","(str)","<p>Subtracts the substring to the main\n<p>*<strong>argument</strong>*: substring\n<p>*<strong>returns</strong>*: new string\n"],["/","Matrix","Matrix.html#method-i-2F","(obj)","<p>Divides each element of the current matrix to a `Numeric` value\n<p>*<strong>argument</strong>*: `Numeric`\n<p>*<strong>returns</strong>*: `Matrix` …\n"],["==","Matrix","Matrix.html#method-i-3D-3D","(obj)","<p>Compares the current matrix with another object\n<p>*<strong>argument</strong>*: `Object` to be compared with\n<p>*<strong>returns</strong>*: <code>true</code> …\n"],["L","LU","LU.html#method-c-L","()","<p>Returns the `L` matrix\n"],["U","LU","LU.html#method-c-U","()","<p>Returns the `U` matrix\n"],["[]","Matrix","Matrix.html#method-i-5B-5D","(x,y)","<p>Gives access to each component of a matrix. It accepts two kinds of\narguments: `Fixnum` or `Range` to …\n"],["[]=","Matrix","Matrix.html#method-i-5B-5D-3D","(i,j,val)","<p>Allows direct overwriting of a component\n<p>*<strong>argument</strong>*: `Fixnum` of row number\n<p>*<strong>argument</strong>*: `Fixnum` of column …\n"],["analyze","Sizer","Sizer.html#method-i-analyze","(string, equal = true)","<p>Analyzes the stream of tokens to check the sintax. It uses a turing machine\nto find errors.\n<p>*<strong>argument</strong> …\n"],["attribute","Token","Token.html#method-i-attribute","()","<p>*<strong>returns</strong>*: token attribute\n\n"],["balanced_brackets?","Function","Function.html#method-i-balanced_brackets-3F","(expr)","<p>Checks if the brackets are balanced in the input function\n<p>*<strong>argument</strong>*: array of the function components …\n"],["balanced_brackets?","Sizer","Sizer.html#method-i-balanced_brackets-3F","(exp)","<p>checks if the input expression has balanced brackets\n<p>*<strong>argument</strong>*: expression (string) to check\n<p>*<strong>returns</strong> …\n"],["boole","Integrators","Integrators.html#method-c-boole","(a,b,n)","<p>Implementation of Boole&#39;s method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["can_divide?","Fixnum","Fixnum.html#method-i-can_divide-3F","(obj)","<p>Checks if the fixnum value can be divided by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_divide?","Float","Float.html#method-i-can_divide-3F","(obj)","<p>Checks if the float value can be divided by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_divide?","Matrix","Matrix.html#method-i-can_divide-3F","(obj)","<p>Checks if the given object can divide the current matrix\n<p>*<strong>argument</strong>*: `Object`\n<p>*<strong>returns</strong>*: <code>true</code> if `obj` …\n"],["can_divide?","Numeric","Numeric.html#method-i-can_divide-3F","(obj)","<p>Checks if the numeric value can be divided by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_multiply?","Fixnum","Fixnum.html#method-i-can_multiply-3F","(obj)","<p>Checks if the fixnum value can be multiplied by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_multiply?","Float","Float.html#method-i-can_multiply-3F","(obj)","<p>Checks if the float value can be multiplied by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_multiply?","Matrix","Matrix.html#method-i-can_multiply-3F","(obj)","<p>Checks if the given object can be multiplied to the matrix\n<p>*<strong>argument</strong>*: `Object`\n<p>*<strong>returns</strong>*: <code>true</code>+ if `obj` …\n"],["can_multiply?","Numeric","Numeric.html#method-i-can_multiply-3F","(obj)","<p>Checks if the numeric value can be multiplied by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["check_block","Sizer","Sizer.html#method-i-check_block","(token)","<p>Checks the sintax of a block, that is: QUOTES-STRING-QUOTES\n<p>*<strong>argument</strong>*: stream of tokens\n<p>*<strong>returns</strong>*: <code>true</code> …\n"],["clear_line","Listener","Listener.html#method-i-clear_line","()","<p>Clears the current line (deletes the typed input)\n"],["coerce","Matrix","Matrix.html#method-i-coerce","(val)",""],["collect_single_key","Listener","Listener.html#method-i-collect_single_key","()","<p>according to the collected key decides what to do: moving the cursor,\nsurfing the history, or simply …\n"],["compact","String","String.html#method-i-compact","()","<p>Deletes spaces from a string\n<p>*<strong>returns</strong>*: new string\n\n"],["contain?","String","String.html#method-i-contain-3F","(str)","<p>Checks if the string contains at least a character of the given one.\n<p>*<strong>argument</strong>*: string for the checking …\n"],["contain_all?","String","String.html#method-i-contain_all-3F","(str)","<p>Checks if the string contains all the characters of the given one.\n<p>*<strong>argument</strong>*: string for the checking …\n"],["convert","Function","Function.html#method-i-convert","(str)","<p>Converts the function inerted by the user in a function written in Ruby\nlanguage\n<p>*<strong>argument</strong>*: input function …\n"],["count","Scp","Scp.html#method-i-count","()","<p>Returns the current value of the counter\n"],["count","Sizer","Sizer.html#method-i-count","()",""],["current_tk","Calculator::Evaluator","Calculator/Evaluator.html#method-i-current_tk","()","<p>*<strong>returns</strong>*: token of the current pointer value\n\n"],["cursor_to","Listener","Listener.html#method-i-cursor_to","(pos)","<p>Moves the cursor backward of the number of specified position\n<p>*<strong>argument</strong>*: number of position the cursor …\n\n"],["default","PrintError","PrintError.html#method-c-default","(token,expression)","<p>*<strong>argument</strong>*: unexpected Token\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n\n"],["del_rwcl","Matrix","Matrix.html#method-i-del_rwcl","(mx,rw,cl)","<p>Private method to delete rows and columns from a matrix\n<p>*<strong>argument</strong>*: `Matrix`\n<p>*<strong>argument</strong>*: row number (`Fixnum`) …\n"],["discard","Scp","Scp.html#method-i-discard","(expr)","<p>Extracts the content between quotes\n<p>*<strong>argument</strong>*: string to extract the content from\n<p>*<strong>returns</strong>*: content (substring) …\n"],["dx","Dim","Dim.html#method-i-dx","()","<p>*<strong>returns</strong>*: right dimension value\n\n"],["evaluate","Calculator::Evaluator","Calculator/Evaluator.html#method-i-evaluate","(stream)","<p>Evaluates the global expression\n<p>*<strong>argument</strong>*: stream of tokens (Array)\n<p>*<strong>returns</strong>*: result of the operations; …\n"],["export","Matrix","Matrix.html#method-i-export","()","<p>*<strong>returns</strong>*: `Array` on which the matrix is saved\n\n"],["extract","Parser","Parser.html#method-i-extract","(expr)","<p>Extracts the content between quotes (it must not be parsed)\n<p>*<strong>argument</strong>*: string to extract the sub-string …\n"],["extract","Scp","Scp.html#method-i-extract","(expr)","<p>Extracts the subexpression between brackets\n<p>*<strong>argument</strong>*: string to extract the sub expression from\n<p>*<strong>returns</strong> …\n"],["extract_gen_exp","Lexer","Lexer.html#method-i-extract_gen_exp","(string)","<p>Reads all the content between quotes so that it can be classified as string\n<p>*<strong>argument</strong>*: string to extract …\n"],["f","Tool","Tool.html#method-c-f","()","<p>*<strong>returns</strong>*: array of the supported math functions; see:\nFunction\n"],["factorize","LU","LU.html#method-c-factorize","(mx,sol)","<p>Performs LU factorization calculating L and U matrices\n<p>*<strong>argument</strong>*: squared matrix to factorize\n<p>*<strong>argument</strong> …\n"],["float?","String","String.html#method-i-float-3F","()","<p>Checks if the strings represents a `Float` value\n<p>*<strong>returns</strong>*: <code>true</code> if the string represents a\n`Float`; …\n\n"],["from_file","Matrix","Matrix.html#method-c-from_file","(filename = \"\")","<p>Creates a new matrix loading it from a .csv file\n<p>*<strong>argument</strong>*: `String` of the file path\n<p>*<strong>returns</strong>*: new matrix …\n"],["getCls","Matrix","Matrix.html#method-i-getCls","()","<p>*<strong>returns</strong>*: `Fixnum` of number of columns\n\n"],["getRws","Matrix","Matrix.html#method-i-getRws","()","<p>*<strong>returns</strong>*: `Fixnum` of number of rows\n\n"],["gets","Listener","Listener.html#method-i-gets","()","<p>main function that can be used. It returns the stream the user wrote on the\ncommand line after they pressed …\n"],["identity","Matrix","Matrix.html#method-c-identity","(n)","<p>Builds an identity matrix\n<p>*<strong>argument</strong>*: `Fixnum` of the matrix dimension\n<p>*<strong>returns</strong>*: `Matrix` object\n"],["insert_b","Scp","Scp.html#method-i-insert_b","(expr)","<p>Inserts a couple of brackets `()` before non-binary sum and diff. operators\n<p>*<strong>argument</strong>*: string to be checked …\n"],["integer?","String","String.html#method-i-integer-3F","()","<p>Checks if the strings represents a `Fixnum` value\n<p>*<strong>returns</strong>*: <code>true</code> if the string represents a\n`Fixnum`; …\n\n"],["integrate","Function","Function.html#method-i-integrate","(r,n,m = 'simpson')","<p>Integrates the function according to the specified method (see:\nIntegrators)\n<p>*<strong>argument</strong>*: dimension of …\n"],["is_a?","Filename","Filename.html#method-i-is_a-3F","(obj)","<p>*<strong>argument</strong>*: class name\n<p>*<strong>returns</strong>*: <code>true</code> if `self.class` = `obj`;\n<code>false</code> else\n\n"],["is_exp?","Tool","Tool.html#method-c-is_exp-3F","(str)","<p>Dummy function to ckeck if a string represents an expression (may not work\nproperly)\n<p>*<strong>argument</strong>*: string …\n"],["is_keyword?","Tool","Tool.html#method-c-is_keyword-3F","(ob)","<p>Checks if a string represents a keyword\n<p>*<strong>argument</strong>*: object to check\n<p>*<strong>returns</strong>*: <code>true</code> if `ob` represents …\n"],["is_similar?","Numeric","Numeric.html#method-i-is_similar-3F","(obj)","<p>Compares the value with another object\n<p>*<strong>argument</strong>*: object for the comparison\n<p>*<strong>returns</strong>*: <code>true</code> if the object …\n"],["is_squared?","Matrix","Matrix.html#method-i-is_squared-3F","()","<p>Checks if the matrix is squared\n<p>*<strong>returns</strong>*: <code>true</code> if the matrix is squared;\n<code>false</code> else\n\n"],["keys","Tool","Tool.html#method-c-keys","()","<p>*<strong>returns</strong>*: array of all the keywords used by linmeric\n\n"],["laplace","Matrix","Matrix.html#method-i-laplace","()","<p>Calulates the determinant of the matrix using the Laplace&#39;s algorithm\n<p>*<strong>returns</strong>*: `Numeric` value\n\n"],["letters","Tool","Tool.html#method-c-letters","()","<p>*<strong>returns</strong>*: alphabet in string format\n\n"],["make_op","Calculator::Evaluator","Calculator/Evaluator.html#method-i-make_op","()","<p>Solves the operations saved in @op\n"],["me","Token","Token.html#method-i-me","()","<p>*<strong>returns</strong>*: token value\n\n"],["midpoint","Integrators","Integrators.html#method-c-midpoint","(a,b,n)","<p>Implementation of midpoint method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["missing","PrintError","PrintError.html#method-c-missing","(token,expression)","<p>*<strong>argument</strong>*: Token arguments are missing for\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\n…\n\n"],["missing_expression_after_equal","PrintError","PrintError.html#method-c-missing_expression_after_equal","(pos,expression)","<p>*<strong>argument</strong>*: position where the error is located\n<p>*<strong>argument</strong>*: expression (commands) where the error has …\n\n"],["missing_general_string","PrintError","PrintError.html#method-c-missing_general_string","(position,expression)","<p>*<strong>argument</strong>*: position where the error is located\n<p>*<strong>argument</strong>*: expression (commands) where the error has …\n\n"],["missing_integ_range","PrintError","PrintError.html#method-c-missing_integ_range","(pos,expression)","<p>*<strong>argument</strong>*: position where the error is located\n<p>*<strong>argument</strong>*: expression (commands) where the error has …\n\n"],["missmatch","PrintError","PrintError.html#method-c-missmatch","(token,expression,expectation)","<p>*<strong>argument</strong>*: missmatched Token found\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n<p>* …\n"],["name","Filename","Filename.html#method-i-name","()","<p>*<strong>returns</strong>*: name of the file (`String`)\n\n"],["new","Archive","Archive.html#method-c-new","()","<p>Creates a new Archive objects\n"],["new","Calculator::Token","Calculator/Token.html#method-c-new","(value)","<p>*<strong>argument</strong>*: value to tokenize (String)\n\n"],["new","Dim","Dim.html#method-c-new","(str)","<p>*<strong>argument</strong>*: string to be converted to a dimension\n\n"],["new","Function","Function.html#method-c-new","(str)","<p>Creates a new `Function` object\n<p>*<strong>argument</strong>*: string to be converted (and representing a\nfunction)\n\n"],["new","Listener","Listener.html#method-c-new","()","<p>Creates the main variables\n"],["new","Matrix","Matrix.html#method-c-new","(rws = 0,cls = 0)","<p>Initialization of new matrix in two different ways (chosen by the user):\n<p>a block can be given to create …\n"],["new","Parser","Parser.html#method-c-new","()","<p>Initialize two new variables: a counter and a boolean one to report errors\nand stop the parser\n"],["new","Scp","Scp.html#method-c-new","()","<p>Initializes a new counter\n"],["new","Sizer","Sizer.html#method-c-new","()","<p>Builds a new lexer\n"],["new","Token","Token.html#method-c-new","(to_token,pos,sugg = \"\")","<p>Creates a new token object\n<p>*<strong>argument</strong>*: token value to name\n<p>*<strong>argument</strong>*: token position\n"],["next_","Archive","Archive.html#method-i-next_","()","<p>Returns the next item compared to the pointer position\n<p>*<strong>returns</strong>*: saved object; “” if the pointer …\n\n"],["no_final_quotes","PrintError","PrintError.html#method-c-no_final_quotes","(expression,position)","<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n<p>*<strong>argument</strong>*: position where the error …\n\n"],["norm","Matrix","Matrix.html#method-i-norm","()","<p>Calculates the norm of a matrix, defined as sqrt(sum(m**2))\n<p>*<strong>returns</strong>*: `Float` value\n\n"],["numPoint_missing","PrintError","PrintError.html#method-c-numPoint_missing","(position,expression)","<p>*<strong>argument</strong>*: position where the error is located\n<p>*<strong>argument</strong>*: expression (commands) where the error has …\n\n"],["number?","String","String.html#method-i-number-3F","()","<p>Checks if the string represents a number\n<p>*<strong>returns</strong>: <code>true</code> if the string represents a\nnumber; <code>false</code> else …\n\n"],["ok?","Function","Function.html#method-i-ok-3F","()","<p>Tells whether the function has been correctly converted from the string\nformat\n<p>*<strong>returns</strong>*: <code>true</code> if the …\n\n"],["operators","Tool","Tool.html#method-c-operators","()","<p>*<strong>returns</strong>*: array of all the operators\n\n"],["parse","Calculator::Evaluator","Calculator/Evaluator.html#method-i-parse","(m_end = nil)","<p>It parses the stream of tokens\n<p>*<strong>argument</strong>*: specific end-token (<code>nil</code> default)\n<p>*<strong>returns</strong>*: result of the operations; …\n"],["parse","Parser","Parser.html#method-i-parse","(expr)","<p>Main function that parses the string\n<p>*<strong>argument</strong>*: string to be parsed; the string must be the\n\n<p>output of …\n"],["position","Token","Token.html#method-i-position","()","<p>*<strong>returns</strong>*: token position\n\n"],["previous","Archive","Archive.html#method-i-previous","()","<p>Returns the previous item compared to the pointer position\n<p>*<strong>returns</strong>*: saved object; “” if the …\n\n"],["print","PrintError","PrintError.html#method-c-print","(message,expression,pos)","<p>Main function that prints the error message\n<p>*<strong>argument</strong>*: message to be printed (string)\n<p>*<strong>argument</strong>*: expression …\n"],["print_stack","Tool","Tool.html#method-c-print_stack","(stack)","<p>Prints the hash of the variables\n<p>*<strong>argument</strong>*: hash to be printed\n\n"],["priority","Calculator::Evaluator","Calculator/Evaluator.html#method-i-priority","(op)","<p>Returns the operator priority\n<p>*<strong>argument</strong>*: operator (string)\n<p>*<strong>returns</strong>*: priority (fixnum)\n"],["read_char","Listener","Listener.html#method-i-read_char","()","<p>Reads a single char from the command line\n"],["reduced","PrintError","PrintError.html#method-c-reduced","(token,expression)","<p>*<strong>argument</strong>*: unexpected Token\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n\n"],["remove","String","String.html#method-i-remove","(index)","<p>Removes a character at the given index\n<p>*<strong>argument</strong>*: index of the character (`Fixnum`)\n<p>*<strong>returns</strong>*: new string …\n"],["reset","LU","LU.html#method-c-reset","()","<p>Sets to nil @L and @U variables\n"],["reset","Listener","Listener.html#method-i-reset","()","<p>reinitializates three main variables\n"],["reset","Parser","Parser.html#method-i-reset","()","<p>Re initializes the counter and the boolean variable\n"],["rettdx","Integrators","Integrators.html#method-c-rettdx","(a,b,n)","<p>Implementation of right rectangles method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["rettsx","Integrators","Integrators.html#method-c-rettsx","(a,b,n)","<p>Implementation of left rectangles method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["scopify","Scp","Scp.html#method-i-scopify","(expr)","<p>Main function that analyzes the string and puts the brackets where it is\nnecessary.\n<p>*<strong>argument</strong>*: string …\n"],["similar_to?","Fixnum","Fixnum.html#method-i-similar_to-3F","(obj)","<p>Compares the value with another object\n<p>*<strong>argument</strong>*: object for the comparison\n<p>*<strong>returns</strong>*: <code>true</code> if the object …\n"],["similar_to?","Float","Float.html#method-i-similar_to-3F","(obj)","<p>Compares the value with another object\n<p>*<strong>argument</strong>*: object for the comparison\n<p>*<strong>returns</strong>*: <code>true</code> if the object …\n"],["similar_to?","Matrix","Matrix.html#method-i-similar_to-3F","(obj)","<p>Checks if this matrix and the given object have the same features\n<p>*<strong>argument</strong>*: `Object`\n<p>*<strong>returns</strong>*: <code>true</code> …\n"],["simpson","Integrators","Integrators.html#method-c-simpson","(a,b,n)","<p>Implementation of Simpson&#39;s method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["size","NilClass","NilClass.html#method-i-size","()","<p>*<strong>returns</strong>*: 0\n\n"],["solve","Calculator","Calculator.html#method-c-solve","(exp)","<p>It solves the expression in string format\n<p>*<strong>argument</strong>*: expression to evaluate\n<p>*<strong>returns</strong>*: result of the expression; …\n"],["solve","LU","LU.html#method-c-solve","(sol)","<p>Finds the solutions of the linear system\n<p>*<strong>argument</strong>*: n x 1 matrix of known values of the linear\nsystem …\n"],["state0_1","Calculator::Evaluator","Calculator/Evaluator.html#method-i-state0_1","(state = 1)","<p>State0_1 accepts only numbers or &#39;(&#39;\n<p>*<strong>argument</strong>*: specification of which state must be runned (1\n…\n"],["state2","Calculator::Evaluator","Calculator/Evaluator.html#method-i-state2","()","<p>State2 accepts only operators\n<p>*<strong>returns</strong>*: next state (symbol)\n\n"],["store","Archive","Archive.html#method-i-store","(str)","<p>Adds a new item to the archive (it keeps the last 20 items which have been\ninserted).\n<p>*<strong>argument</strong>*: item …\n\n"],["swap","LU","LU.html#method-c-swap","(mx,r1,r2)","<p>Swaps two rows of a matrix (pivoting)\n<p>*<strong>argument</strong>*: matrix the rows must be swapped on\n<p>*<strong>argument</strong>*: first …\n"],["sx","Dim","Dim.html#method-i-sx","()","<p>*<strong>returns</strong>*: left dimension value\n\n"],["tag","Calculator::Token","Calculator/Token.html#method-i-tag","()","<p>*<strong>returns</strong>*: tag of the token\n\n"],["to_block","Function","Function.html#method-i-to_block","(n = 0)","<p>Returns the function as a ruby block ({ |…| … })\n<p>*<strong>argument</strong>*: number of variables needed for the block; …\n"],["to_file","Matrix","Matrix.html#method-i-to_file","(filename = \"\")","<p>Writes the matrix on a file\n<p>*<strong>argument</strong>*: `String` of the file path\n\n"],["to_n","String","String.html#method-i-to_n","()","<p>Converts a string to a number\n<p>*<strong>returns</strong>*: `Float` value if the string represents a float\n\n<p>`Fixnum` value …\n"],["to_s","Filename","Filename.html#method-i-to_s","()",""],["to_s","Function","Function.html#method-i-to_s","()","<p>*<strong>returns</strong>*: string representation of the function\n\n"],["to_s","Matrix","Matrix.html#method-i-to_s","()","<p>converts this matrix object to a string\n"],["to_s","NilClass","NilClass.html#method-i-to_s","()","<p>*<strong>returns</strong>*: string representation of <code>nil</code>\n\n"],["tokenize","Calculator::Lexer","Calculator/Lexer.html#method-i-tokenize","(string)","<p>It creates the tokens according to `OP` or &#39;(&#39; and &#39;)&#39;\n<p>*<strong>argument</strong>*: the string that needs …\n"],["tokenize","Function","Function.html#method-i-tokenize","(str)","<p>Splits the input string into its components (variables,operators…)\n<p>*<strong>argument</strong>*: input function in string …\n"],["tokenize","Lexer","Lexer.html#method-i-tokenize","(expr)","<p>Tokenizes the input stream according to particular tokenizer symbols which\ndetermine the end of an element.Eg …\n"],["top","Archive","Archive.html#method-i-top","()","<p>Moves the pointer to the top of the archive (the last element inserted)\n"],["tr","Matrix","Matrix.html#method-i-tr","()","<p>Trasposes a matrix\n<p>*<strong>returns</strong>*: `Matrix` object\n"],["translate","Function","Function.html#method-i-translate","(str,open_b = false)","<p>Translates the function from linmeric language to Ruby language using a\nturing machine to detect possible …\n"],["trapezi","Integrators","Integrators.html#method-c-trapezi","(a,b,n)","<p>Implementation of trapezes method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["unexpected_token_in_solve","PrintError","PrintError.html#method-c-unexpected_token_in_solve","(token,expression)","<p>*<strong>argument</strong>*: unexpected Token found\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n\n"],["unknown","PrintError","PrintError.html#method-c-unknown","(token,expression)","<p>*<strong>argument</strong>*: unknown Token found\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n\n"],["update","Matrix","Matrix.html#method-i-update","(mat,rws,cls)","<p>Updates this matrix after the array in which it was saved has been manually\nmodified\n<p>*<strong>argument</strong>*: `Array` …\n"],["value","Calculator::Token","Calculator/Token.html#method-i-value","()","<p>*<strong>returns</strong>*: value of the token\n\n"],["vars","Function","Function.html#method-i-vars","(n = 0)","<p>Builds the list of the variables needed for the block\n<p>*<strong>argument</strong>*: number of variables needed for the block …\n"],["README","","README_md.html","","<p>Linmeric\n<p>This simple numeric calulator provides an easy command line user interface\nto make operations …\n"]]}}
1
+ var search_data = {"index":{"searchIndex":["archive","calculator","evaluator","lexer","token","dim","filename","fixnum","float","function","inputerror","intnum","integer","integrators","lu","lexer","linmeric","listener","matrix","myargerror","nilclass","numeric","object","parser","printerror","scp","sizer","string","token","tool","!=()","*()","**()","+()","-()","-()","/()","==()","l()","u()","[]()","[]=()","analyze()","attribute()","balanced_brackets?()","balanced_brackets?()","boole()","can_divide?()","can_divide?()","can_divide?()","can_divide?()","can_multiply?()","can_multiply?()","can_multiply?()","can_multiply?()","check_block()","clear_line()","coerce()","collect_single_key()","compact()","contain?()","contain_all?()","convert()","count()","count()","current_tk()","cursor_to()","default()","del_rwcl()","discard()","dx()","evaluate()","export()","extract()","extract()","extract_gen_exp()","f()","factorize()","float?()","from_file()","getcls()","getrws()","gets()","identity()","insert_b()","integer?()","integrate()","is_a?()","is_exp?()","is_keyword?()","is_similar?()","is_squared?()","keys()","laplace()","letters()","make_op()","me()","midpoint()","missing()","missing_expression_after_equal()","missing_general_string()","missing_integ_range()","missmatch()","name()","new()","new()","new()","new()","new()","new()","new()","new()","new()","new()","next_()","no_final_quotes()","norm()","numpoint_missing()","number?()","ok?()","operators()","parse()","parse()","position()","previous()","print()","print_stack()","priority()","read_char()","reduced()","remove()","reset()","reset()","reset()","rettdx()","rettsx()","scopify()","similar_to?()","similar_to?()","similar_to?()","simpson()","size()","solve()","solve()","state0_1()","state2()","store()","swap()","sx()","tag()","to_block()","to_file()","to_n()","to_s()","to_s()","to_s()","to_s()","tokenize()","tokenize()","tokenize()","top()","tr()","translate()","trapezi()","unexpected_token_in_solve()","unknown()","update()","value()","vars()","readme"],"longSearchIndex":["archive","calculator","calculator::evaluator","calculator::lexer","calculator::token","dim","filename","fixnum","float","function","inputerror","intnum","integer","integrators","lu","lexer","linmeric","listener","matrix","myargerror","nilclass","numeric","object","parser","printerror","scp","sizer","string","token","tool","matrix#!=()","matrix#*()","matrix#**()","matrix#+()","matrix#-()","string#-()","matrix#/()","matrix#==()","lu::l()","lu::u()","matrix#[]()","matrix#[]=()","sizer#analyze()","token#attribute()","function#balanced_brackets?()","sizer#balanced_brackets?()","integrators::boole()","float#can_divide?()","intnum#can_divide?()","matrix#can_divide?()","numeric#can_divide?()","float#can_multiply?()","intnum#can_multiply?()","matrix#can_multiply?()","numeric#can_multiply?()","sizer#check_block()","listener#clear_line()","matrix#coerce()","listener#collect_single_key()","string#compact()","string#contain?()","string#contain_all?()","function#convert()","scp#count()","sizer#count()","calculator::evaluator#current_tk()","listener#cursor_to()","printerror::default()","matrix#del_rwcl()","scp#discard()","dim#dx()","calculator::evaluator#evaluate()","matrix#export()","parser#extract()","scp#extract()","lexer#extract_gen_exp()","tool::f()","lu::factorize()","string#float?()","matrix::from_file()","matrix#getcls()","matrix#getrws()","listener#gets()","matrix::identity()","scp#insert_b()","string#integer?()","function#integrate()","filename#is_a?()","tool::is_exp?()","tool::is_keyword?()","numeric#is_similar?()","matrix#is_squared?()","tool::keys()","matrix#laplace()","tool::letters()","calculator::evaluator#make_op()","token#me()","integrators::midpoint()","printerror::missing()","printerror::missing_expression_after_equal()","printerror::missing_general_string()","printerror::missing_integ_range()","printerror::missmatch()","filename#name()","archive::new()","calculator::token::new()","dim::new()","function::new()","listener::new()","matrix::new()","parser::new()","scp::new()","sizer::new()","token::new()","archive#next_()","printerror::no_final_quotes()","matrix#norm()","printerror::numpoint_missing()","string#number?()","function#ok?()","tool::operators()","calculator::evaluator#parse()","parser#parse()","token#position()","archive#previous()","printerror::print()","tool::print_stack()","calculator::evaluator#priority()","listener#read_char()","printerror::reduced()","string#remove()","lu::reset()","listener#reset()","parser#reset()","integrators::rettdx()","integrators::rettsx()","scp#scopify()","float#similar_to?()","intnum#similar_to?()","matrix#similar_to?()","integrators::simpson()","nilclass#size()","calculator::solve()","lu::solve()","calculator::evaluator#state0_1()","calculator::evaluator#state2()","archive#store()","lu::swap()","dim#sx()","calculator::token#tag()","function#to_block()","matrix#to_file()","string#to_n()","filename#to_s()","function#to_s()","matrix#to_s()","nilclass#to_s()","calculator::lexer#tokenize()","function#tokenize()","lexer#tokenize()","archive#top()","matrix#tr()","function#translate()","integrators::trapezi()","printerror::unexpected_token_in_solve()","printerror::unknown()","matrix#update()","calculator::token#value()","function#vars()",""],"info":[["Archive","","Archive.html","","<p>This class provides a useful object to store the command history of\nlinmeric\n<p>Author &mdash; Massimiliano Dal …\n"],["Calculator","","Calculator.html","","<p>This file contains a simple expression evaluator to convert math binary\noperations in a result. It is …\n"],["Calculator::Evaluator","","Calculator/Evaluator.html","","<p>Evaluator parses and evaluates at the same time the stream of tokens\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com …\n"],["Calculator::Lexer","","Calculator/Lexer.html","","<p>This lexser creates the tokens splitting the input string according to the\noperators (OP =&gt; see Calculator …\n"],["Calculator::Token","","Calculator/Token.html","","<p>Definition of a simple token with an attribute (@tag) and a value (@val)\n<p>Author &mdash; Massimiliano Dal Mas ( …\n"],["Dim","","Dim.html","","<p>Definition of a dimension (structure: from-to)\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License … &mdash; "],["Filename","","Filename.html","","<p>Defining a subclass of string to identify a fileneme\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com …\n"],["Fixnum","","Fixnum.html","",""],["Float","","Float.html","","<p>Overload of Float class\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under …\n"],["Function","","Function.html","","<p>This class provides a simple representation of a function and some method\nto manipulate it\n<p>Author &mdash; Massimiliano …\n"],["InputError","","InputError.html","",""],["IntNum","","IntNum.html","","<p>Definition of some method for Int numbers. This is included in Integer\nclass (ruby_version &gt;= 2.2 …\n"],["Integer","","Integer.html","",""],["Integrators","","Integrators.html","","<p>This module provides some method to integrate a function\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com …\n"],["LU","","LU.html","","<p>This module provides some method to perform LU factorization on squared\nmatrices.\n<p>Author &mdash; Massimiliano …\n"],["Lexer","","Lexer.html","","<p>This simple Lexer tokenizes the input stream of commands for the sintax\nanalyzer\n<p>Author &mdash; Massimiliano …\n"],["Linmeric","","Linmeric.html","",""],["Listener","","Listener.html","","<p>This class works on the command line interface to allow the user to move\nthe cursor, modify the input …\n"],["Matrix","","Matrix.html","","<p>This class provides a simple representation of a matrix with the main\nfeatures, operations and some useful …\n"],["MyArgError","","MyArgError.html","",""],["NilClass","","NilClass.html","","<p>Overload of NilClass\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under MIT …\n"],["Numeric","","Numeric.html","","<p>Overload of Numeric class\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under …\n"],["Object","","Object.html","",""],["Parser","","Parser.html","","<p>This is a stack-based parser that returns a tree in array format. Sub\narrays are operations with higher …\n"],["PrintError","","PrintError.html","","<p>This modue provides a set of error messages for linmeric\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com …\n"],["Scp","","Scp.html","","<p>This class manipulates a string representing an algebric expression\nunderlining the higher priority operations …\n"],["Sizer","","Sizer.html","","<p>Sizer analyzes the sintax of the inserted commands printing errors if they\nare found, before the string …\n"],["String","","String.html","","<p>Overload of String class\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License &mdash; Distributed under …\n"],["Token","","Token.html","","<p>This class generates a token object with three parameters:\n<p>Attribute\n<p>Position\n"],["Tool","","Tool.html","","<p>Provides some useful procedure for linmeric\n<p>Author &mdash; Massimiliano Dal Mas (max.codeware@gmail.com)\n<p>License … &mdash; "],["!=","Matrix","Matrix.html#method-i-21-3D","(obj)","<p>Checks if this matrix is different from another object\n<p>*<strong>argument</strong>*: `Object` to be compared with\n<p>*<strong>returns</strong> …\n"],["*","Matrix","Matrix.html#method-i-2A","(ob)","<p>Multiplies the current matrix to another\n<p>*<strong>argument</strong>*: `Matrix` to be multiplied to\n<p>*<strong>returns</strong>*: `Matrix` object …\n"],["**","Matrix","Matrix.html#method-i-2A-2A","(obj)","<p>Elevates each element of the current matrix to a `Numeric` exponent\n<p>*<strong>argument</strong>*: `Numeric`\n<p>*<strong>returns</strong>*: `Matrix` …\n"],["+","Matrix","Matrix.html#method-i-2B","(m)","<p>Sums the current matrix to another\n<p>*<strong>argument</strong>*: `Matrix` to be summed to\n<p>*<strong>returns</strong>*: `Matrix` object\n"],["-","Matrix","Matrix.html#method-i-2D","(m)","<p>Subtracts the current matrix to another\n<p>*<strong>argument</strong>*: `Matrix` to be subtracted to\n<p>*<strong>returns</strong>*: `Matrix` object …\n"],["-","String","String.html#method-i-2D","(str)","<p>Subtracts the substring to the main\n<p>*<strong>argument</strong>*: substring\n<p>*<strong>returns</strong>*: new string\n"],["/","Matrix","Matrix.html#method-i-2F","(obj)","<p>Divides each element of the current matrix to a `Numeric` value\n<p>*<strong>argument</strong>*: `Numeric`\n<p>*<strong>returns</strong>*: `Matrix` …\n"],["==","Matrix","Matrix.html#method-i-3D-3D","(obj)","<p>Compares the current matrix with another object\n<p>*<strong>argument</strong>*: `Object` to be compared with\n<p>*<strong>returns</strong>*: <code>true</code> …\n"],["L","LU","LU.html#method-c-L","()","<p>Returns the `L` matrix\n"],["U","LU","LU.html#method-c-U","()","<p>Returns the `U` matrix\n"],["[]","Matrix","Matrix.html#method-i-5B-5D","(x,y)","<p>Gives access to each component of a matrix. It accepts two kinds of\narguments: `Fixnum` or `Range` to …\n"],["[]=","Matrix","Matrix.html#method-i-5B-5D-3D","(i,j,val)","<p>Allows direct overwriting of a component\n<p>*<strong>argument</strong>*: `Fixnum` of row number\n<p>*<strong>argument</strong>*: `Fixnum` of column …\n"],["analyze","Sizer","Sizer.html#method-i-analyze","(string, equal = true)","<p>Analyzes the stream of tokens to check the sintax. It uses a turing machine\nto find errors.\n<p>*<strong>argument</strong> …\n"],["attribute","Token","Token.html#method-i-attribute","()","<p>*<strong>returns</strong>*: token attribute\n\n"],["balanced_brackets?","Function","Function.html#method-i-balanced_brackets-3F","(expr)","<p>Checks if the brackets are balanced in the input function\n<p>*<strong>argument</strong>*: array of the function components …\n"],["balanced_brackets?","Sizer","Sizer.html#method-i-balanced_brackets-3F","(exp)","<p>checks if the input expression has balanced brackets\n<p>*<strong>argument</strong>*: expression (string) to check\n<p>*<strong>returns</strong> …\n"],["boole","Integrators","Integrators.html#method-c-boole","(a,b,n)","<p>Implementation of Boole&#39;s method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["can_divide?","Float","Float.html#method-i-can_divide-3F","(obj)","<p>Checks if the float value can be divided by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_divide?","IntNum","IntNum.html#method-i-can_divide-3F","(obj)","<p>Checks if the fixnum value can be divided by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_divide?","Matrix","Matrix.html#method-i-can_divide-3F","(obj)","<p>Checks if the given object can divide the current matrix\n<p>*<strong>argument</strong>*: `Object`\n<p>*<strong>returns</strong>*: <code>true</code> if `obj` …\n"],["can_divide?","Numeric","Numeric.html#method-i-can_divide-3F","(obj)","<p>Checks if the numeric value can be divided by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_multiply?","Float","Float.html#method-i-can_multiply-3F","(obj)","<p>Checks if the float value can be multiplied by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_multiply?","IntNum","IntNum.html#method-i-can_multiply-3F","(obj)","<p>Checks if the fixnum value can be multiplied by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["can_multiply?","Matrix","Matrix.html#method-i-can_multiply-3F","(obj)","<p>Checks if the given object can be multiplied to the matrix\n<p>*<strong>argument</strong>*: `Object`\n<p>*<strong>returns</strong>*: <code>true</code>+ if `obj` …\n"],["can_multiply?","Numeric","Numeric.html#method-i-can_multiply-3F","(obj)","<p>Checks if the numeric value can be multiplied by a given object\n<p>*<strong>argument</strong>*: object for the checking\n<p>*<strong>returns</strong> …\n"],["check_block","Sizer","Sizer.html#method-i-check_block","(token)","<p>Checks the sintax of a block, that is: QUOTES-STRING-QUOTES\n<p>*<strong>argument</strong>*: stream of tokens\n<p>*<strong>returns</strong>*: <code>true</code> …\n"],["clear_line","Listener","Listener.html#method-i-clear_line","()","<p>Clears the current line (deletes the typed input)\n"],["coerce","Matrix","Matrix.html#method-i-coerce","(val)",""],["collect_single_key","Listener","Listener.html#method-i-collect_single_key","()","<p>according to the collected key decides what to do: moving the cursor,\nsurfing the history, or simply …\n"],["compact","String","String.html#method-i-compact","()","<p>Deletes spaces from a string\n<p>*<strong>returns</strong>*: new string\n\n"],["contain?","String","String.html#method-i-contain-3F","(str)","<p>Checks if the string contains at least a character of the given one.\n<p>*<strong>argument</strong>*: string for the checking …\n"],["contain_all?","String","String.html#method-i-contain_all-3F","(str)","<p>Checks if the string contains all the characters of the given one.\n<p>*<strong>argument</strong>*: string for the checking …\n"],["convert","Function","Function.html#method-i-convert","(str)","<p>Converts the function inerted by the user in a function written in Ruby\nlanguage\n<p>*<strong>argument</strong>*: input function …\n"],["count","Scp","Scp.html#method-i-count","()","<p>Returns the current value of the counter\n"],["count","Sizer","Sizer.html#method-i-count","()",""],["current_tk","Calculator::Evaluator","Calculator/Evaluator.html#method-i-current_tk","()","<p>*<strong>returns</strong>*: token of the current pointer value\n\n"],["cursor_to","Listener","Listener.html#method-i-cursor_to","(pos)","<p>Moves the cursor backward of the number of specified position\n<p>*<strong>argument</strong>*: number of position the cursor …\n\n"],["default","PrintError","PrintError.html#method-c-default","(token,expression)","<p>*<strong>argument</strong>*: unexpected Token\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n\n"],["del_rwcl","Matrix","Matrix.html#method-i-del_rwcl","(mx,rw,cl)","<p>Private method to delete rows and columns from a matrix\n<p>*<strong>argument</strong>*: `Matrix`\n<p>*<strong>argument</strong>*: row number (`Fixnum`) …\n"],["discard","Scp","Scp.html#method-i-discard","(expr)","<p>Extracts the content between quotes\n<p>*<strong>argument</strong>*: string to extract the content from\n<p>*<strong>returns</strong>*: content (substring) …\n"],["dx","Dim","Dim.html#method-i-dx","()","<p>*<strong>returns</strong>*: right dimension value\n\n"],["evaluate","Calculator::Evaluator","Calculator/Evaluator.html#method-i-evaluate","(stream)","<p>Evaluates the global expression\n<p>*<strong>argument</strong>*: stream of tokens (Array)\n<p>*<strong>returns</strong>*: result of the operations; …\n"],["export","Matrix","Matrix.html#method-i-export","()","<p>*<strong>returns</strong>*: `Array` on which the matrix is saved\n\n"],["extract","Parser","Parser.html#method-i-extract","(expr)","<p>Extracts the content between quotes (it must not be parsed)\n<p>*<strong>argument</strong>*: string to extract the sub-string …\n"],["extract","Scp","Scp.html#method-i-extract","(expr)","<p>Extracts the subexpression between brackets\n<p>*<strong>argument</strong>*: string to extract the sub expression from\n<p>*<strong>returns</strong> …\n"],["extract_gen_exp","Lexer","Lexer.html#method-i-extract_gen_exp","(string)","<p>Reads all the content between quotes so that it can be classified as string\n<p>*<strong>argument</strong>*: string to extract …\n"],["f","Tool","Tool.html#method-c-f","()","<p>*<strong>returns</strong>*: array of the supported math functions; see:\nFunction\n"],["factorize","LU","LU.html#method-c-factorize","(mx,sol)","<p>Performs LU factorization calculating L and U matrices\n<p>*<strong>argument</strong>*: squared matrix to factorize\n<p>*<strong>argument</strong> …\n"],["float?","String","String.html#method-i-float-3F","()","<p>Checks if the strings represents a `Float` value\n<p>*<strong>returns</strong>*: <code>true</code> if the string represents a\n`Float`; …\n\n"],["from_file","Matrix","Matrix.html#method-c-from_file","(filename = \"\")","<p>Creates a new matrix loading it from a .csv file\n<p>*<strong>argument</strong>*: `String` of the file path\n<p>*<strong>returns</strong>*: new matrix …\n"],["getCls","Matrix","Matrix.html#method-i-getCls","()","<p>*<strong>returns</strong>*: `Fixnum` of number of columns\n\n"],["getRws","Matrix","Matrix.html#method-i-getRws","()","<p>*<strong>returns</strong>*: `Fixnum` of number of rows\n\n"],["gets","Listener","Listener.html#method-i-gets","()","<p>main function that can be used. It returns the stream the user wrote on the\ncommand line after they pressed …\n"],["identity","Matrix","Matrix.html#method-c-identity","(n)","<p>Builds an identity matrix\n<p>*<strong>argument</strong>*: `Fixnum` of the matrix dimension\n<p>*<strong>returns</strong>*: `Matrix` object\n"],["insert_b","Scp","Scp.html#method-i-insert_b","(expr)","<p>Inserts a couple of brackets `()` before non-binary sum and diff. operators\n<p>*<strong>argument</strong>*: string to be checked …\n"],["integer?","String","String.html#method-i-integer-3F","()","<p>Checks if the strings represents a `Fixnum` value\n<p>*<strong>returns</strong>*: <code>true</code> if the string represents a\n`Fixnum`; …\n\n"],["integrate","Function","Function.html#method-i-integrate","(r,n,m = 'simpson')","<p>Integrates the function according to the specified method (see:\nIntegrators)\n<p>*<strong>argument</strong>*: dimension of …\n"],["is_a?","Filename","Filename.html#method-i-is_a-3F","(obj)","<p>*<strong>argument</strong>*: class name\n<p>*<strong>returns</strong>*: <code>true</code> if `self.class` = `obj`;\n<code>false</code> else\n\n"],["is_exp?","Tool","Tool.html#method-c-is_exp-3F","(str)","<p>Dummy function to ckeck if a string represents an expression (may not work\nproperly)\n<p>*<strong>argument</strong>*: string …\n"],["is_keyword?","Tool","Tool.html#method-c-is_keyword-3F","(ob)","<p>Checks if a string represents a keyword\n<p>*<strong>argument</strong>*: object to check\n<p>*<strong>returns</strong>*: <code>true</code> if `ob` represents …\n"],["is_similar?","Numeric","Numeric.html#method-i-is_similar-3F","(obj)","<p>Compares the value with another object\n<p>*<strong>argument</strong>*: object for the comparison\n<p>*<strong>returns</strong>*: <code>true</code> if the object …\n"],["is_squared?","Matrix","Matrix.html#method-i-is_squared-3F","()","<p>Checks if the matrix is squared\n<p>*<strong>returns</strong>*: <code>true</code> if the matrix is squared;\n<code>false</code> else\n\n"],["keys","Tool","Tool.html#method-c-keys","()","<p>*<strong>returns</strong>*: array of all the keywords used by linmeric\n\n"],["laplace","Matrix","Matrix.html#method-i-laplace","()","<p>Calulates the determinant of the matrix using the Laplace&#39;s algorithm\n<p>*<strong>returns</strong>*: `Numeric` value\n\n"],["letters","Tool","Tool.html#method-c-letters","()","<p>*<strong>returns</strong>*: alphabet in string format\n\n"],["make_op","Calculator::Evaluator","Calculator/Evaluator.html#method-i-make_op","()","<p>Solves the operations saved in @op\n"],["me","Token","Token.html#method-i-me","()","<p>*<strong>returns</strong>*: token value\n\n"],["midpoint","Integrators","Integrators.html#method-c-midpoint","(a,b,n)","<p>Implementation of midpoint method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["missing","PrintError","PrintError.html#method-c-missing","(token,expression)","<p>*<strong>argument</strong>*: Token arguments are missing for\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\n…\n\n"],["missing_expression_after_equal","PrintError","PrintError.html#method-c-missing_expression_after_equal","(pos,expression)","<p>*<strong>argument</strong>*: position where the error is located\n<p>*<strong>argument</strong>*: expression (commands) where the error has …\n\n"],["missing_general_string","PrintError","PrintError.html#method-c-missing_general_string","(position,expression)","<p>*<strong>argument</strong>*: position where the error is located\n<p>*<strong>argument</strong>*: expression (commands) where the error has …\n\n"],["missing_integ_range","PrintError","PrintError.html#method-c-missing_integ_range","(pos,expression)","<p>*<strong>argument</strong>*: position where the error is located\n<p>*<strong>argument</strong>*: expression (commands) where the error has …\n\n"],["missmatch","PrintError","PrintError.html#method-c-missmatch","(token,expression,expectation)","<p>*<strong>argument</strong>*: missmatched Token found\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n<p>* …\n"],["name","Filename","Filename.html#method-i-name","()","<p>*<strong>returns</strong>*: name of the file (`String`)\n\n"],["new","Archive","Archive.html#method-c-new","()","<p>Creates a new Archive objects\n"],["new","Calculator::Token","Calculator/Token.html#method-c-new","(value)","<p>*<strong>argument</strong>*: value to tokenize (String)\n\n"],["new","Dim","Dim.html#method-c-new","(str)","<p>*<strong>argument</strong>*: string to be converted to a dimension\n\n"],["new","Function","Function.html#method-c-new","(str)","<p>Creates a new `Function` object\n<p>*<strong>argument</strong>*: string to be converted (and representing a\nfunction)\n\n"],["new","Listener","Listener.html#method-c-new","()","<p>Creates the main variables\n"],["new","Matrix","Matrix.html#method-c-new","(rws = 0,cls = 0)","<p>Initialization of new matrix in two different ways (chosen by the user):\n<p>a block can be given to create …\n"],["new","Parser","Parser.html#method-c-new","()","<p>Initialize two new variables: a counter and a boolean one to report errors\nand stop the parser\n"],["new","Scp","Scp.html#method-c-new","()","<p>Initializes a new counter\n"],["new","Sizer","Sizer.html#method-c-new","()","<p>Builds a new lexer\n"],["new","Token","Token.html#method-c-new","(to_token,pos,sugg = \"\")","<p>Creates a new token object\n<p>*<strong>argument</strong>*: token value to name\n<p>*<strong>argument</strong>*: token position\n"],["next_","Archive","Archive.html#method-i-next_","()","<p>Returns the next item compared to the pointer position\n<p>*<strong>returns</strong>*: saved object; “” if the pointer …\n\n"],["no_final_quotes","PrintError","PrintError.html#method-c-no_final_quotes","(expression,position)","<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n<p>*<strong>argument</strong>*: position where the error …\n\n"],["norm","Matrix","Matrix.html#method-i-norm","()","<p>Calculates the norm of a matrix, defined as sqrt(sum(m**2))\n<p>*<strong>returns</strong>*: `Float` value\n\n"],["numPoint_missing","PrintError","PrintError.html#method-c-numPoint_missing","(position,expression)","<p>*<strong>argument</strong>*: position where the error is located\n<p>*<strong>argument</strong>*: expression (commands) where the error has …\n\n"],["number?","String","String.html#method-i-number-3F","()","<p>Checks if the string represents a number\n<p>*<strong>returns</strong>: <code>true</code> if the string represents a\nnumber; <code>false</code> else …\n\n"],["ok?","Function","Function.html#method-i-ok-3F","()","<p>Tells whether the function has been correctly converted from the string\nformat\n<p>*<strong>returns</strong>*: <code>true</code> if the …\n\n"],["operators","Tool","Tool.html#method-c-operators","()","<p>*<strong>returns</strong>*: array of all the operators\n\n"],["parse","Calculator::Evaluator","Calculator/Evaluator.html#method-i-parse","(m_end = nil)","<p>It parses the stream of tokens\n<p>*<strong>argument</strong>*: specific end-token (<code>nil</code> default)\n<p>*<strong>returns</strong>*: result of the operations; …\n"],["parse","Parser","Parser.html#method-i-parse","(expr)","<p>Main function that parses the string\n<p>*<strong>argument</strong>*: string to be parsed; the string must be the\n\n<p>output of …\n"],["position","Token","Token.html#method-i-position","()","<p>*<strong>returns</strong>*: token position\n\n"],["previous","Archive","Archive.html#method-i-previous","()","<p>Returns the previous item compared to the pointer position\n<p>*<strong>returns</strong>*: saved object; “” if the …\n\n"],["print","PrintError","PrintError.html#method-c-print","(message,expression,pos)","<p>Main function that prints the error message\n<p>*<strong>argument</strong>*: message to be printed (string)\n<p>*<strong>argument</strong>*: expression …\n"],["print_stack","Tool","Tool.html#method-c-print_stack","(stack)","<p>Prints the hash of the variables\n<p>*<strong>argument</strong>*: hash to be printed\n\n"],["priority","Calculator::Evaluator","Calculator/Evaluator.html#method-i-priority","(op)","<p>Returns the operator priority\n<p>*<strong>argument</strong>*: operator (string)\n<p>*<strong>returns</strong>*: priority (fixnum)\n"],["read_char","Listener","Listener.html#method-i-read_char","()","<p>Reads a single char from the command line\n"],["reduced","PrintError","PrintError.html#method-c-reduced","(token,expression)","<p>*<strong>argument</strong>*: unexpected Token\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n\n"],["remove","String","String.html#method-i-remove","(index)","<p>Removes a character at the given index\n<p>*<strong>argument</strong>*: index of the character (`Fixnum`)\n<p>*<strong>returns</strong>*: new string …\n"],["reset","LU","LU.html#method-c-reset","()","<p>Sets to nil @L and @U variables\n"],["reset","Listener","Listener.html#method-i-reset","()","<p>reinitializates three main variables\n"],["reset","Parser","Parser.html#method-i-reset","()","<p>Re initializes the counter and the boolean variable\n"],["rettdx","Integrators","Integrators.html#method-c-rettdx","(a,b,n)","<p>Implementation of right rectangles method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["rettsx","Integrators","Integrators.html#method-c-rettsx","(a,b,n)","<p>Implementation of left rectangles method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["scopify","Scp","Scp.html#method-i-scopify","(expr)","<p>Main function that analyzes the string and puts the brackets where it is\nnecessary.\n<p>*<strong>argument</strong>*: string …\n"],["similar_to?","Float","Float.html#method-i-similar_to-3F","(obj)","<p>Compares the value with another object\n<p>*<strong>argument</strong>*: object for the comparison\n<p>*<strong>returns</strong>*: <code>true</code> if the object …\n"],["similar_to?","IntNum","IntNum.html#method-i-similar_to-3F","(obj)","<p>Compares the value with another object\n<p>*<strong>argument</strong>*: object for the comparison\n<p>*<strong>returns</strong>*: <code>true</code> if the object …\n"],["similar_to?","Matrix","Matrix.html#method-i-similar_to-3F","(obj)","<p>Checks if this matrix and the given object have the same features\n<p>*<strong>argument</strong>*: `Object`\n<p>*<strong>returns</strong>*: <code>true</code> …\n"],["simpson","Integrators","Integrators.html#method-c-simpson","(a,b,n)","<p>Implementation of Simpson&#39;s method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["size","NilClass","NilClass.html#method-i-size","()","<p>*<strong>returns</strong>*: 0\n\n"],["solve","Calculator","Calculator.html#method-c-solve","(exp)","<p>It solves the expression in string format\n<p>*<strong>argument</strong>*: expression to evaluate\n<p>*<strong>returns</strong>*: result of the expression; …\n"],["solve","LU","LU.html#method-c-solve","(sol)","<p>Finds the solutions of the linear system\n<p>*<strong>argument</strong>*: n x 1 matrix of known values of the linear\nsystem …\n"],["state0_1","Calculator::Evaluator","Calculator/Evaluator.html#method-i-state0_1","(state = 1)","<p>State0_1 accepts only numbers or &#39;(&#39;\n<p>*<strong>argument</strong>*: specification of which state must be runned (1\n…\n"],["state2","Calculator::Evaluator","Calculator/Evaluator.html#method-i-state2","()","<p>State2 accepts only operators\n<p>*<strong>returns</strong>*: next state (symbol)\n\n"],["store","Archive","Archive.html#method-i-store","(str)","<p>Adds a new item to the archive (it keeps the last 20 items which have been\ninserted).\n<p>*<strong>argument</strong>*: item …\n\n"],["swap","LU","LU.html#method-c-swap","(mx,r1,r2)","<p>Swaps two rows of a matrix (pivoting)\n<p>*<strong>argument</strong>*: matrix the rows must be swapped on\n<p>*<strong>argument</strong>*: first …\n"],["sx","Dim","Dim.html#method-i-sx","()","<p>*<strong>returns</strong>*: left dimension value\n\n"],["tag","Calculator::Token","Calculator/Token.html#method-i-tag","()","<p>*<strong>returns</strong>*: tag of the token\n\n"],["to_block","Function","Function.html#method-i-to_block","(n = 0)","<p>Returns the function as a ruby block ({ |…| … })\n<p>*<strong>argument</strong>*: number of variables needed for the block; …\n"],["to_file","Matrix","Matrix.html#method-i-to_file","(filename = \"\")","<p>Writes the matrix on a file\n<p>*<strong>argument</strong>*: `String` of the file path\n\n"],["to_n","String","String.html#method-i-to_n","()","<p>Converts a string to a number\n<p>*<strong>returns</strong>*: `Float` value if the string represents a float\n\n<p>`Fixnum` value …\n"],["to_s","Filename","Filename.html#method-i-to_s","()",""],["to_s","Function","Function.html#method-i-to_s","()","<p>*<strong>returns</strong>*: string representation of the function\n\n"],["to_s","Matrix","Matrix.html#method-i-to_s","()","<p>converts this matrix object to a string\n"],["to_s","NilClass","NilClass.html#method-i-to_s","()","<p>*<strong>returns</strong>*: string representation of <code>nil</code>\n\n"],["tokenize","Calculator::Lexer","Calculator/Lexer.html#method-i-tokenize","(string)","<p>It creates the tokens according to `OP` or &#39;(&#39; and &#39;)&#39;\n<p>*<strong>argument</strong>*: the string that needs …\n"],["tokenize","Function","Function.html#method-i-tokenize","(str)","<p>Splits the input string into its components (variables,operators…)\n<p>*<strong>argument</strong>*: input function in string …\n"],["tokenize","Lexer","Lexer.html#method-i-tokenize","(expr)","<p>Tokenizes the input stream according to particular tokenizer symbols which\ndetermine the end of an element.Eg …\n"],["top","Archive","Archive.html#method-i-top","()","<p>Moves the pointer to the top of the archive (the last element inserted)\n"],["tr","Matrix","Matrix.html#method-i-tr","()","<p>Trasposes a matrix\n<p>*<strong>returns</strong>*: `Matrix` object\n"],["translate","Function","Function.html#method-i-translate","(str,open_b = false)","<p>Translates the function from linmeric language to Ruby language using a\nturing machine to detect possible …\n"],["trapezi","Integrators","Integrators.html#method-c-trapezi","(a,b,n)","<p>Implementation of trapezes method\n<p>*<strong>argument</strong>*: left range value\n<p>*<strong>argument</strong>*: right range value\n"],["unexpected_token_in_solve","PrintError","PrintError.html#method-c-unexpected_token_in_solve","(token,expression)","<p>*<strong>argument</strong>*: unexpected Token found\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n\n"],["unknown","PrintError","PrintError.html#method-c-unknown","(token,expression)","<p>*<strong>argument</strong>*: unknown Token found\n<p>*<strong>argument</strong>*: expression (commands) where the error has been\nfound\n\n"],["update","Matrix","Matrix.html#method-i-update","(mat,rws,cls)","<p>Updates this matrix after the array in which it was saved has been manually\nmodified\n<p>*<strong>argument</strong>*: `Array` …\n"],["value","Calculator::Token","Calculator/Token.html#method-i-value","()","<p>*<strong>returns</strong>*: value of the token\n\n"],["vars","Function","Function.html#method-i-vars","(n = 0)","<p>Builds the list of the variables needed for the block\n<p>*<strong>argument</strong>*: number of variables needed for the block …\n"],["README","","README_md.html","","<p>Linmeric\n<p>This simple numeric calulator provides an easy command line user interface\nto make operations …\n"]]}}
Binary file
@@ -52,13 +52,13 @@ Searcher.prototype = new function() {
52
52
  /* ----- Utilities ------ */
53
53
  function splitQuery(query) {
54
54
  return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) {
55
- return string.match(/\S/)
55
+ return string.match(/\S/);
56
56
  });
57
57
  }
58
58
 
59
59
  function buildRegexps(queries) {
60
60
  return jQuery.map(queries, function(query) {
61
- return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i')
61
+ return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i');
62
62
  });
63
63
  }
64
64
 
@@ -172,6 +172,7 @@ Searcher.prototype = new function() {
172
172
  result.path = info[2];
173
173
  result.params = info[3];
174
174
  result.snippet = info[4];
175
+ result.badge = info[6];
175
176
  return result;
176
177
  }
177
178
 
Binary file
@@ -8,6 +8,7 @@
8
8
 
9
9
  <script type="text/javascript">
10
10
  var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
11
12
  </script>
12
13
 
13
14
  <script src="./js/jquery.js"></script>
@@ -75,6 +76,12 @@
75
76
  <li class="class">
76
77
  <a href="InputError.html">InputError</a>
77
78
  </li>
79
+ <li class="module">
80
+ <a href="IntNum.html">IntNum</a>
81
+ </li>
82
+ <li class="class">
83
+ <a href="Integer.html">Integer</a>
84
+ </li>
78
85
  <li class="module">
79
86
  <a href="Integrators.html">Integrators</a>
80
87
  </li>
@@ -102,6 +109,9 @@
102
109
  <li class="class">
103
110
  <a href="Numeric.html">Numeric</a>
104
111
  </li>
112
+ <li class="class">
113
+ <a href="Object.html">Object</a>
114
+ </li>
105
115
  <li class="class">
106
116
  <a href="Parser.html">Parser</a>
107
117
  </li>
@@ -429,14 +439,14 @@
429
439
  <span class="container">Numeric</span>
430
440
 
431
441
  <li class="method">
432
- <a href="Fixnum.html#method-i-can_divide-3F">#can_divide?</a>
442
+ <a href="Float.html#method-i-can_divide-3F">#can_divide?</a>
433
443
  &mdash;
434
- <span class="container">Fixnum</span>
444
+ <span class="container">Float</span>
435
445
 
436
446
  <li class="method">
437
- <a href="Float.html#method-i-can_divide-3F">#can_divide?</a>
447
+ <a href="IntNum.html#method-i-can_divide-3F">#can_divide?</a>
438
448
  &mdash;
439
- <span class="container">Float</span>
449
+ <span class="container">IntNum</span>
440
450
 
441
451
  <li class="method">
442
452
  <a href="Matrix.html#method-i-can_multiply-3F">#can_multiply?</a>
@@ -449,14 +459,14 @@
449
459
  <span class="container">Numeric</span>
450
460
 
451
461
  <li class="method">
452
- <a href="Fixnum.html#method-i-can_multiply-3F">#can_multiply?</a>
462
+ <a href="Float.html#method-i-can_multiply-3F">#can_multiply?</a>
453
463
  &mdash;
454
- <span class="container">Fixnum</span>
464
+ <span class="container">Float</span>
455
465
 
456
466
  <li class="method">
457
- <a href="Float.html#method-i-can_multiply-3F">#can_multiply?</a>
467
+ <a href="IntNum.html#method-i-can_multiply-3F">#can_multiply?</a>
458
468
  &mdash;
459
- <span class="container">Float</span>
469
+ <span class="container">IntNum</span>
460
470
 
461
471
  <li class="method">
462
472
  <a href="Sizer.html#method-i-check_block">#check_block</a>
@@ -704,14 +714,14 @@
704
714
  <span class="container">Matrix</span>
705
715
 
706
716
  <li class="method">
707
- <a href="Fixnum.html#method-i-similar_to-3F">#similar_to?</a>
717
+ <a href="Float.html#method-i-similar_to-3F">#similar_to?</a>
708
718
  &mdash;
709
- <span class="container">Fixnum</span>
719
+ <span class="container">Float</span>
710
720
 
711
721
  <li class="method">
712
- <a href="Float.html#method-i-similar_to-3F">#similar_to?</a>
722
+ <a href="IntNum.html#method-i-similar_to-3F">#similar_to?</a>
713
723
  &mdash;
714
- <span class="container">Float</span>
724
+ <span class="container">IntNum</span>
715
725
 
716
726
  <li class="method">
717
727
  <a href="NilClass.html#method-i-size">#size</a>
@@ -828,7 +838,7 @@
828
838
 
829
839
  <footer id="validator-badges" role="contentinfo">
830
840
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
831
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
841
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
832
842
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
833
843
  </footer>
834
844
 
@@ -8,6 +8,12 @@ require_relative 'Calculator.rb'
8
8
  class InputError < ArgumentError; end
9
9
  class MyArgError < RuntimeError; end
10
10
 
11
+ # Little patch for ruby_version
12
+ if RUBY_VERSION >= "2.2.0" then
13
+ Int = Integer
14
+ else
15
+ Int = Fixnum
16
+ end
11
17
  ##
12
18
  # This class provides a simple representation of a matrix with the main
13
19
  # features, operations and some useful method to manipulate it or to make
@@ -30,9 +36,9 @@ class Matrix
30
36
  listener = Listener.new
31
37
  if rws == 0 or cls == 0 or rws.is_a? Float or cls.is_a? Float then
32
38
  raise MyArgError," Argument Error: invalid dimension #{rws}x#{cls} for Matrix object"
33
- elsif !(rws.is_a? Fixnum) or !(cls.is_a? Fixnum) then
34
- e = rws unless e.is_a? Fixnum
35
- e = cls unless cls.is_a? Fixnum
39
+ elsif !(rws.is_a? Int) or !(cls.is_a? Int) then
40
+ e = rws unless e.is_a? Int
41
+ e = cls unless cls.is_a? Int
36
42
  raise MyArgError," Argument Error: colums and rows in Integer format expected but #{e.class} found"
37
43
  else
38
44
  @MyRws = rws; @MyCls = cls
@@ -396,7 +402,7 @@ class Matrix
396
402
  # * **argument**: `Fixnum` of the matrix dimension
397
403
  # * **returns**: `Matrix` object
398
404
  def Matrix.identity(n)
399
- raise MyArgError, "Argument Error: expecting Fixnum value, but #{n.class} found" unless n.is_a? Fixnum
405
+ raise MyArgError, "Argument Error: expecting Fixnum value, but #{n.class} found" unless n.is_a? Int
400
406
  return Matrix.new(n,n) { |i,j| (i == j) ? 1 : 0 }
401
407
  end
402
408
 
@@ -414,7 +420,7 @@ class Matrix
414
420
  # * **returns**: `Matrix` object
415
421
  def del_rwcl(mx,rw,cl)
416
422
  [rw,cl].each do |arg|
417
- raise MyArgError,"Argument Error: row and column in Fixnum format expected, but #{arg.class} found" unless arg.is_a? Fixnum
423
+ raise MyArgError,"Argument Error: row and column in Fixnum format expected, but #{arg.class} found" unless arg.is_a? Int
418
424
  end
419
425
  rd = mx.export.clone
420
426
  cols = mx.getCls
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative 'Function_class.rb'
4
4
 
5
+
5
6
  ##
6
7
  # Overload of Numeric class
7
8
  #
@@ -37,12 +38,13 @@ class Numeric
37
38
  end
38
39
 
39
40
  ##
40
- # Overload of Fixnum class
41
+ # Definition of some method for Int numbers. This is included in Integer class (ruby_version >= 2.2)
42
+ # or Fixnum class (ruby_version <= 2.2)
41
43
  #
42
44
  #
43
45
  # Author:: Massimiliano Dal Mas (mailto:max.codeware@gmail.com)
44
46
  # License:: Distributed under MIT license
45
- class Fixnum
47
+ module IntNum
46
48
 
47
49
  # Compares the value with another object
48
50
  #
@@ -70,6 +72,16 @@ class Fixnum
70
72
 
71
73
  end
72
74
 
75
+ # Little patch for ruby versions
76
+ if RUBY_VERSION >= "2.2.0"
77
+ class Integer
78
+ include IntNum
79
+ end
80
+ else
81
+ class Fixnum
82
+ include IntNum
83
+ end
84
+ end
73
85
 
74
86
  ##
75
87
  # Overload of Float class
@@ -99,16 +99,16 @@ class Parser
99
99
  x = array.pop.to_s + c
100
100
  array.push x
101
101
  when /\p{Alnum}/
102
- if expr[@d-1] =~ /[0-9\.x]/ && array.count>0
103
- x = array.pop.to_s + c
102
+ if expr[@d-1] =~ /[0-9]/ && array.count > 0
103
+ x = array.pop.to_s + c
104
104
  array.push x.to_n
105
- elsif (expr[@d-1] =~ /[a-z\A-Z]/ or expr[@d-1] == '_') && array.count>0
105
+ elsif (expr[@d-1] =~ /[a-zA-Z]/ or expr[@d-1] == '_') && array.count > 0
106
106
  x = array.pop.to_s + c
107
- array.push x
107
+ array.push x
108
108
  else
109
- array.push c.to_n if c =~ /[0-9\.x]/
109
+ array.push c.to_n if c =~ /[0-9]/
110
110
  array.push c if c =~ /[a-zA-Z]/
111
- end
111
+ end
112
112
  @d += 1
113
113
  else
114
114
  unless @error
@@ -233,6 +233,9 @@ class Sizer
233
233
  end
234
234
  end
235
235
  state = 2
236
+ else
237
+ PrintError.missmatch(token[@i],@@string,"keyword 'from:' or block")
238
+ return false
236
239
  end
237
240
 
238
241
  # checking integ arguments (full check)
@@ -1,3 +1,3 @@
1
1
  module Linmeric
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -7,6 +7,7 @@
7
7
  linmeric/Scopify.rb
8
8
  linmeric/Listener.rb
9
9
  linmeric/Sizer.rb
10
- linmeric/LU.rb|.each do |f|
10
+ linmeric/LU.rb
11
+ linmeric/version.rb|.each do |f|
11
12
  require_relative f
12
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linmeric
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Massimiliano Dal Mas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-18 00:00:00.000000000 Z
11
+ date: 2017-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,7 +38,9 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: Simple command line calculator to make operations on matrices and functions
41
+ description: Simple command line calculator to make operations on matrices and functions.
42
+ It allows easy ways to create, manipulate and export matrices and to integrate functions.
43
+ A website with a whole tutorial has been provided at https://max-codeware.github.io/linmeric
42
44
  email:
43
45
  - max.codeware@gmail.com
44
46
  executables:
@@ -70,8 +72,8 @@ files:
70
72
  - doc/Float.html
71
73
  - doc/Function.html
72
74
  - doc/InputError.html
73
- - doc/Instructions_en.txt
74
- - doc/Instructions_it.txt
75
+ - doc/IntNum.html
76
+ - doc/Integer.html
75
77
  - doc/Integrators.html
76
78
  - doc/LU.html
77
79
  - doc/Lexer.html
@@ -81,6 +83,7 @@ files:
81
83
  - doc/MyArgError.html
82
84
  - doc/NilClass.html
83
85
  - doc/Numeric.html
86
+ - doc/Object.html
84
87
  - doc/Parser.html
85
88
  - doc/PrintError.html
86
89
  - doc/README_md.html
@@ -173,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
176
  version: '0'
174
177
  requirements: []
175
178
  rubyforge_project:
176
- rubygems_version: 2.4.5.2
179
+ rubygems_version: 2.6.11
177
180
  signing_key:
178
181
  specification_version: 4
179
182
  summary: Simple numeric calculator
@@ -1,207 +0,0 @@
1
-
2
- LINMERIC: designed and developed by Massimiliano Dal Mas
3
-
4
- Email: max.codeware@gmail.com
5
-
6
- Requires 'io/console'
7
-
8
- ## symbols used in this documentations: ##
9
-
10
- <text> : kind of argument to be replaced
11
- #=> : output of the program
12
- // : specifications or comments
13
- => : from..to
14
- <> : different
15
-
16
- ####################################
17
- # INSTRUCTIONS #
18
- ####################################
19
- ________________________
20
- #_VARIABLE ASSIGNMENT:_#
21
- ************************
22
-
23
- <variable_name> = <value>
24
- or
25
- <variable_name> = <expression>
26
-
27
- Examples: v1 = 13
28
- e1 = 3*4^2 #=> 48
29
- e2 = a*b+c // a,b,c already defined
30
-
31
- (allowed operations: +,-,*,/,^)
32
-
33
- This interpreter sees as different uppercase and lowercase letters in variable definitions. (A1 <> a1)
34
-
35
- ________________________
36
- #_VARIABLE DISPLAYING:_#
37
- ************************
38
-
39
- shw: <variable_name> or simply typing <variable_name>
40
-
41
- Examples: // v1 = 13
42
- shw: v1 #=> 13
43
- v1 #=> 13
44
-
45
- Displaying all the inserted variables through the keyword 'shwvar:' (no argument required).
46
-
47
- Example: // v1 = 13, v2 = 22
48
- shwvar: #=> v1 = 13, #=> v2 = 22
49
-
50
- ________________
51
- #_COMPARISONS:_#
52
- ****************
53
-
54
- <expression> = <expression>
55
-
56
- Examples: 12+7 = 10+9 #=> true
57
- 12*8 = 20^123 #=> false
58
-
59
- a/b = c*f #=> true/false
60
-
61
- ________________________
62
- #_CREATING A FUNCTION:_#
63
- ************************
64
-
65
- <function_name> = f: "<function_definition>"
66
-
67
- Examples: fx = f: "x*log(x)"
68
- gx = f: "y^z"
69
-
70
- At the moment, the following algebric functions are supported: log, sin, cos, exp, tan
71
- Constants: PI (PI = 3,14...)
72
-
73
- Restriction: parameters must be composed by only one letter (x,y,k,a...)
74
-
75
- Warning: this interpreter uses ruby methods to solve functions.
76
- Therefore, divisions with numbers return a number in the format corresponding to the one of the denominator.
77
- Example: 1/2 #=> 0 (integer => integer); 1/2.0 #=> 0.5 (float => float)
78
-
79
- ______________________
80
- #_CREATING A MATRIX:_#
81
- **********************
82
-
83
- Matrix inserted by hand:
84
-
85
- <matrix_name> = mx: "<rows>,<columns>"
86
-
87
- Matrix according to a certain function rows-columns (or number)
88
-
89
- <matrix_name> = mx: "<rows>,<columns>" as: "<function_definition>"
90
-
91
- or
92
-
93
- <matrix_name> = mx: "<rows>,<columns>" as: <function_name>
94
-
95
- Matrix loaded from a file:
96
-
97
- <matrix_name> = mx: from: "<file_path>"
98
-
99
- Identity matrix:
100
-
101
- <matrix_name> = id_mx: <size>
102
-
103
- Examples: m1 = mx: "4,4" // it creates a 4x4 matrix with values inserted by the user
104
- m2 = mx: "4,4" as: "r*c" // it creates a 4x4 matrix in which each element is given by the product row_number*column_number
105
-
106
- // kx = f: "r*c"
107
-
108
- m4 = mx: "4,4" as: kx // equals to the previous example
109
- m5 = mx: from: "/home/usr/Desktop/matrice.csv" // it loads the matrix written in the .csv file
110
- // the interpreter reads only .csv files
111
- id = id_mx: 5 // it creates an identity 5x5 matrix
112
-
113
- Allowed operations: +, -, *
114
- / (Matrix-number) It divides each element of the specified matrix for the given number
115
- ^ (Matrix-number) It elevates each element at the given exponent
116
-
117
- It is possible to insert as value simple operations as 3/4, 10^5...
118
-
119
- __________________________
120
- #_OPERATIONS ON MATRICES_#
121
- **************************
122
-
123
- Transposition: t: <matrix_name>
124
- Example:
125
- // m1: 4x7 matrix
126
- t: m1 #=> 7x4 matrix
127
-
128
- Norm: norm: <matrix_name>
129
- Example:
130
- norm: m1 // sqrt (sum (m1[r,c]^2))
131
-
132
- Determinant: det: <matrix_name>
133
- Example:
134
- // m0: 6,6 matrix
135
- det: m0
136
-
137
- Results can be stored in a variable
138
-
139
- ________________________
140
- #_FUNCTION INTEGRATION_#
141
- ************************
142
-
143
-
144
- integ: "<function_definitio>" "<range>" <number_of_integration_points> ("<integration_method>")
145
-
146
- It is possible to replace the function definition with a variable containing the function itself.
147
- Results can be stored in a variable.
148
-
149
- Examples: integ: "x*log(x^2)" "3,10" 50 // integration of 'x*log(x^2)' from 3 to 10 on 50 points
150
- integ: "x*log(x^2)" "3,10" 50 "midpoint" // integration method specifyed
151
- // sx = f: "x*log(x^2)"
152
- integ: sx "3,10" 50
153
-
154
- Available integration methods: trapezes // trapezes method
155
- rectl // left-rectangles method
156
- rectr // right-rectangles method
157
- midpoint // middle-rectangles method
158
- simpson // simpson method (default)
159
- boole // boole method
160
-
161
- ____________________
162
- #_LU FACTORIZATION_#
163
- ********************
164
-
165
- solve: <matrix_name> ~ <solution_matrix_name>
166
- or
167
- solve: <expression_with_matrices> ~ <expression_with_matrices>
168
-
169
- Examples:
170
- a,b,c: 3x3 matrices
171
- d : 3x1 matrix
172
-
173
- solve: a ~ d // returns the x-matrix containing the solutions of the system (d: known system values matrix)
174
- solve: a*b ~ c*d // returns the x-matrix solution of the matrix returned by a*b
175
-
176
- LU factorization with direct matrix creation:
177
-
178
- solve: (mx: "4,4") ~ (mx: "4,1")
179
-
180
- L and U matrices are saved as variables with their default names (L,U)
181
-
182
-
183
- _____________________________________
184
- #_WRITING VALUES AND DATAS ON FILES_#
185
- *************************************
186
-
187
- <value> > "<file_path>"
188
- or
189
- <expression> > "<file_path>"
190
- or
191
- <variable_name> > "<file_path>"
192
-
193
- Examples: 23 > "/home/usr/Desktop/val.txt" // the number 23 will be written in val.txt. If the file does not exist,
194
- it will be created
195
- s*q0+1 > "/home/usr/Desktop/val.txt" // the result of 's*q0+1' will be written in val.txt (s,q0 are variables)
196
- // mk: 8x8 matrix
197
- mk > "/home/usr/Desktop/matrx.csv" // Matrix 'mk' will be written in matrix.csv
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-