Polski
huginn - programming language with no quirks, so simple every child can master it.
Fork me on GitHub git clone https://codestation.org/repo/huginn.git
git clone https://github.com/AmokHuginnsson/huginn.git
git clone https://bitbucket.org/huginn/huginn.git
  1. Syntax
  2. Keywords
  3. Types

    Huginn provides several built-in scalar and collection types, as well as user defined compound types.

    integer real string number character boolean list deque dict order lookup set
  4. Built-ins
  5. Core library classes
  6. Packages

The Mathematics package provides essential mathematical functions and classes. All of those functions and classes work with values of both real and number types.

Methods
  • Complex( real, imaginary ) - create instance of Complex with real real part and imaginary imaginary part.
  • MathematicsException( message ) - create instance of MathematicsException with given message
  • Matrix( type, rows, cols ) - create instance of Matrix class of values of type type and rows rows and cols columns.
  • NumberSetStatistics( iterable ) - calculate numerical statistics over given iterable iterable of uniformly types values
  • Randomizer([ cap ]) - create random number generator which output values are capped at cap
  • arcus_cosinus( arg ) - calculate value of arcus cosine function of arg argument
  • arcus_cotangens( arg ) - calculate value of arcus cotangent function of arg argument
  • arcus_sinus( arg ) - calculate value of arcus sine function of arg argument
  • arcus_tangens( arg ) - calculate value of arcus tangent function of arg argument
  • ceil( value ) - get smallest integral value not less than value
  • cosinus( arg ) - calculate value of cosine function of arg argument
  • cotangens( arg ) - calculate value of cotangent function of arg argument
  • cumulative_distribution_function( arg, mu, sigma ) - calculate value of cumulative distribution function for normal distribution of arg argument, mu arithmetic mean and sigma standard deviation
  • differs_at( first, second ) - tell at which decimal position first and second values have first occurrence of different digit
  • e( type [, precision] ) - get value of $e$ of type type, potentially with given precision
  • error_function( arg ) - calculate value of (Gaussian) error function of arg argument
  • floor( value ) - get largest integral value not greater than value
  • hyperbolic_cosinus( arg ) - calculate value of hyperbolic cosine function of arg argument
  • hyperbolic_cotangens( arg ) - calculate value of hyperbolic cotangent function of arg argument
  • hyperbolic_sinus( arg ) - calculate value of hyperbolic sine function of arg argument
  • hyperbolic_tangens( arg ) - calculate value of hyperbolic tangent function of arg argument
  • natural_exponential( x ) - calculate value of $e^x$ (value of natural exponential of x)
  • natural_logarithm( x ) - find natural logarithm of value x
  • pi( type [, precision] ) - get value of $\pi$ of type type, potentially with given precision
  • round( value[, precision] ) - round value, potentially to given precision
  • sigmoid( arg ) - calculate value of sigmoid function of arg argument
  • sinus( arg ) - calculate value of sine function of arg argument
  • square_root( value ) - calculate square root of given value
  • statistics( iterable ) - create NumberSetStatistics over iterable of uniformly types values
  • tangens( arg ) - calculate value of tangent function of arg argument

The MathematicsException exception type for Mathematics package.

The Complex class provides mathematical concept of complex numbers. It supports operations of addition, multiplication, subtraction, division, modulus and argument.

Methods
  • add( other ) - add otherComplex to this Complex number
  • argument() - get argument value of this Complex number
  • divide( other ) - divide this Complex by otherComplex number
  • get() - both real and imaginary part of this Complex
  • imaginary() - get imaginary part of this Complex number
  • modulus() - get modulus value of this Complex number
  • multiply( other ) - multiply this Complex by otherComplex number
  • negate() - get negation of this Complex number
  • real() - get real part of this Complex number
  • set( real, imaginary ) - set both real and imaginary part of this Complex number
  • subtract( other ) - subtract otherComplex from this Complex number
  • to_string() - get string representation of this Complex number

The Matrix class provides mathematical concept of number matrices. It supports operations of addition, multiplication, subtraction, scaling, inversion and transposition.

Methods
  • add( other ) - add otherMatrix to this Matrix
  • apply( fun ) - apply unary function fun over all values in this Matrix
  • columns() - get column dimension of this Matrix
  • det() - find value of determinant of this Matrix
  • get( row, column ) - get numeric value present at given row and column in this Matrix
  • inverse() - find inverse of this Matrix
  • modulus() - find value of determinant of this Matrix
  • multiply( other ) - multiply this Matrix by otherMatrix
  • negate() - get negation of this Matrix
  • rows() - get row dimension of this Matrix
  • scale( factor ) - scale all values in this Matrix by given factor
  • scale_to( cap ) - rescale values in this Matrix so maximum of its values is equal to cap
  • set( row, column, value ) - set given numeric value at given row and column in this Matrix
  • subtract( other ) - subtract otherMatrix from this Matrix
  • to_string() - get string representation of this Matrix
  • transpose() - create transposed version of this Matrix

The Randomizer class represents a random number generator concept. Randomizer can generate uniform distribution of either integer or real values from given range.

Methods
  • next([ range ]) - get next integer random number, possibly restricted to given range
  • next_real([ range ]) - get next real random number, possibly restricted to given range
  • to_string() - get string representation of this Randomizer

The NumberSetStatistics is a class representing results of gathering numerical statistics over some uniformly typed number set.

Methods
  • arithmetic_mean() - an arithmetic mean of all numbers in set
  • count() - a number of elements in given numeric set
  • interquartile_range() - an interquartile range of given set of values
  • maximum() - a maximum numeric value in set
  • mean_absolute_deviation() - a mean absolute deviation of the numeric set
  • median() - a median value in set
  • mid_range() - a mid range value of the numbers in the given set
  • minimum() - a minimum numeric value in set
  • population_standard_deviation() - a population standard deviation of the numeric set
  • population_variance() - a population sample_variance of the numeric set
  • range() - a range of values in the numeric set
  • sample_standard_deviation() - a standard deviation of the numeric set
  • sample_variance() - a sample_variance of the set
  • sum() - a sum of all values in set