Skip to content

Style guidelines and notes

maxbennedich edited this page Aug 28, 2018 · 3 revisions

General conventions for nep-pack:

  • Classes and types use CamelCase, starting with a capital letter.
  • Functions use lower case letters, except for abbreviations which can be upper case. Avoid starting with a first capital letter. Also, short variables representing matrices should be capitalized.
  • Variable names and functions consisting of several words can be written together (e.g. eigmethod, resinv, augnewton, ...). An underscore between words (i.e. snake case) should be inserted if the variable is otherwise too difficult to read.
  • No whitespace at the end of a line (trailing whitespace).

Method keyword arguments (kwargs):

  • maxit = maximum number of iterations
  • neigs = number of wanted eigenvalues
  • tol = tolerance for termination criteria
  • errmeasure :: Function of (lambda,v) returning real value e.g. residual norm
  • displaylevel (displaylevel=0 should print nothing. Use e.g. @ifd(println("ASD")) )
  • linsolvecreator :: Function
  • v=eigenvector approximation (or starting vector)
  • λ=eigenvalue approximation (or starting eigenvalue)
  • σ=target:
  • check_error_every= checks for convergence/error every kth iteration
Clone this wiki locally