Loading [MathJax]/extensions/tex2jax.js
Apps
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
tut10_doxygen.lua File Reference

Functions

function fill (N, c)
 a function to create a string by repeating a character
 
function pdf (x, sigma, mu)
 calculates the probability density function
 

Variables

parameterNumber mu = 0
 mean (location of the peak
 
parameterNumber sigma = 3
 variance
 

Detailed Description

The purpose of this tutorial is to demonstrate how you can document your lua code so that you get a nice html documentation with doxygen. You can get a list of commands at http://www.stack.nl/~dimitri/doxygen/commands.html You can also take a look at pageUG4DoxygenQuickref and pageUG4CodingStyle

Function Documentation

◆ fill()

function fill ( ,
c   
)

a function to create a string by repeating a character

this is our doxygen comment in LUA this is our multi-line doxygen comment fill

This function is really useful for formatting tables.

Parameters
Nnumber of times c is to be repeated
ccharacter to repeat (if omitted, " ")
Returns
a string consisting of N times the character c
Note
this is a copy of util.fill
See also
stats_util.lua

location: /home/runner/work/docs/docs/ug4/apps/Tutorials / tut10_doxygen.lua :35-42

function fill(N, c)
local s=""
if c == nil then c = " " end
for i=1,N do
s=s..c
return s
parameterString s
function *Umax *y end
Definition channel.lua:87
parameterNumber c
Definition mixinglayer.lua:13
function fill(N, c)
a function to create a string by repeating a character

◆ pdf()

function pdf ( ,
sigma  ,
mu   
)

calculates the probability density function

Parameters
x
mu\(\mu\) = mean (location of the peak) default 0
sigma\(\sigma^2\) = variance. default 1
Returns
\(\frac{1}{\sqrt{2\pi\sigma^2}}\, e^{\frac{-(x-\mu)^2}{2\sigma^2}}\)

location: /home/runner/work/docs/docs/ug4/apps/Tutorials / tut10_doxygen.lua :51-53

function pdf(x, sigma, mu)
return 1/(sigma*math.sqrt(2*math.pi)) * math.exp(-0.5*math.pow((x-mu)/sigma, 2))
parameterNumber sigma
variance
Definition tut10_doxygen.lua:62
function pdf(x, sigma, mu)
calculates the probability density function
parameterNumber mu
mean (location of the peak
Definition tut10_doxygen.lua:58

Variable Documentation

◆ mu

parameterNumber mu = 0

mean (location of the peak

mu is the mean

See also
http://en.wikipedia.org/wiki/Mean

Referenced by create_domain(), and parse_cmd_args().

◆ sigma

parameterNumber sigma = 3

variance

variance is a a measure of how far a set of numbers is spread out

See also
http://en.wikipedia.org/wiki/Variance