Index: embedded/www/index.html ================================================================== --- embedded/www/index.html +++ embedded/www/index.html @@ -2343,11 +2343,11 @@ grammar::me_intro · grammar::peg::interp · pt · pt::ast · pt::cparam::configuration::critcl · pt::cparam::configuration::tea · pt::json_language · pt::param · pt::pe · pt::pe::op · pt::peg · pt::peg::container · pt::peg::container::peg · pt::peg::export · pt::peg::export::container · pt::peg::export::json · pt::peg::export::peg · pt::peg::from::container · pt::peg::from::json · pt::peg::from::peg · pt::peg::import · pt::peg::import::container · pt::peg::import::json · pt::peg::import::peg · pt::peg::interp · pt::peg::to::container · pt::peg::to::cparam · pt::peg::to::json · pt::peg::to::param · pt::peg::to::peg · pt::peg::to::tclparam · pt::peg_language · pt::pegrammar · pt::pgen · pt::rde · pt::tclparam::configuration::nx · pt::tclparam::configuration::snit · pt::tclparam::configuration::tcloo · pt::util · pt_export_api · pt_import_api · pt_introduction · pt_parse_peg · pt_parser_api · pt_peg_op · struct::graph::op math - math · math::bigfloat · math::bignum · math::calculus · math::complexnumbers · math::constants · math::decimal · math::fuzzy · math::geometry · math::interpolate · math::linearalgebra · math::optimize · math::PCA · math::polynomials · math::rationalfunctions · math::special · simulation::annealing · simulation::montecarlo · simulation::random + math · math::bigfloat · math::bignum · math::calculus · math::complexnumbers · math::constants · math::decimal · math::fuzzy · math::geometry · math::interpolate · math::linearalgebra · math::optimize · math::PCA · math::polynomials · math::rationalfunctions · math::special · math::trig · simulation::annealing · simulation::montecarlo · simulation::random mathematics math::fourier · math::statistics @@ -4142,293 +4142,298 @@ TreeQL treeql + trigonometry + + math::trig + + trimming textutil · textutil::trim - + twitter oauth - + type fileutil · fileutil::magic::cfront · fileutil::magic::cgen · fileutil::magic::filetype · fileutil::magic::rt · snit - + Type checking valtype::common · valtype::creditcard::amex · valtype::creditcard::discover · valtype::creditcard::mastercard · valtype::creditcard::visa · valtype::gs1::ean13 · valtype::iban · valtype::imei · valtype::isbn · valtype::luhn · valtype::luhn5 · valtype::usnpi · valtype::verhoeff Keywords: U - + uevent hook - + unbind uevent - + uncapitalize textutil::string - + undenting textutil::adjust - + unicode stringprep · stringprep::data · unicode · unicode::data - + union struct::disjointset · struct::set - + unit units - + unknown hooking namespacex - + untie tie · tie - + update coroutine · coroutine::auto - + uri uri · uri_urn - + url doctools::idx · doctools::idx::export · doctools::idx::import · doctools::toc::export · doctools::toc::import · map::geocode::nominatim · map::slippy::fetcher · uri · uri_urn - + urn uri_urn - + US-NPI valtype::usnpi - + utilities namespacex - + uuencode uuencode - + UUID uuid Keywords: V - + Validation valtype::common · valtype::creditcard::amex · valtype::creditcard::discover · valtype::creditcard::mastercard · valtype::creditcard::visa · valtype::gs1::ean13 · valtype::iban · valtype::imei · valtype::isbn · valtype::luhn · valtype::luhn5 · valtype::usnpi · valtype::verhoeff - + Value checking valtype::common · valtype::creditcard::amex · valtype::creditcard::discover · valtype::creditcard::mastercard · valtype::creditcard::visa · valtype::gs1::ean13 · valtype::iban · valtype::imei · valtype::isbn · valtype::luhn · valtype::luhn5 · valtype::usnpi · valtype::verhoeff - + vectors math::linearalgebra - + verhoeff valtype::verhoeff - + vertex struct::graph · struct::graph::op - + vertex cover struct::graph::op - + virtual channel tcl::chan::cat · tcl::chan::core · tcl::chan::events · tcl::chan::facade · tcl::chan::fifo · tcl::chan::fifo2 · tcl::chan::halfpipe · tcl::chan::memchan · tcl::chan::null · tcl::chan::nullzero · tcl::chan::random · tcl::chan::std · tcl::chan::string · tcl::chan::textwindow · tcl::chan::variable · tcl::chan::zero · tcl::randomseed · tcl::transform::adler32 · tcl::transform::base64 · tcl::transform::core · tcl::transform::counter · tcl::transform::crc32 · tcl::transform::hex · tcl::transform::identity · tcl::transform::limitsize · tcl::transform::observe · tcl::transform::otp · tcl::transform::rot · tcl::transform::spacer · tcl::transform::zlib - + virtual machine grammar::me::cpu · grammar::me::cpu::core · grammar::me::cpu::gasm · grammar::me::tcl · grammar::me_intro · grammar::me_vm · grammar::peg::interp · pt::param - + VISA valtype::creditcard::visa - + vwait coroutine · coroutine::auto · smtpd Keywords: W - + wais uri - + widget snit · snitfaq - + widget adaptors snit · snitfaq - + wiki doctools::idx · doctools::idx · doctools::idx::export · doctools::idx::export::wiki · doctools::toc · doctools::toc · doctools::toc::export · doctools::toc::export::wiki - + word doctools::tcl::parse · wip - + WWW tool - + www uri Keywords: X - + x.208 asn - + x.209 asn - + x.500 ldap - + XGoogleToken SASL::XGoogleToken - + xml xsxp - + xor tcl::transform::otp - + XPath treeql - + XSLT treeql Keywords: Y - + yaml huddle · yaml - + ydecode yencode - + yEnc yencode - + yencode yencode Keywords: Z - + zero tcl::chan::nullzero · tcl::chan::zero - + zip zipfile::decode · zipfile::encode · zipfile::mkzip - + zlib tcl::transform::zlib - + zoom map::slippy · map::slippy::cache · map::slippy::fetcher Index: embedded/www/tcllib/files/modules/cache/async.html ================================================================== --- embedded/www/tcllib/files/modules/cache/async.html +++ embedded/www/tcllib/files/modules/cache/async.html @@ -1,5 +1,6 @@ +
+
[ + Main Table Of Contents +| Table Of Contents +| Keyword Index +| Categories +| Modules +| Applications + ]
+
+

lazyset(n) 1 tcllib "Lazy evaluation for variables and arrays"

+

Name

+

lazyset - Lazy evaluation

+
+ +

Synopsis

+
+
    +
  • package require Tcl 8.5
  • +
  • package require lazyset ?1?
  • +
+ +
+
+

Description

+

The lazyset package provides a mechanism for deferring execution +of code until a specific variable or any index of an array is referenced.

+
+

COMMANDS

+
+
::lazyset::variable ?-array boolean? ?-appendArgs boolean? variableName commandPrefix
+

Arrange for the code specified as commandPrefix to be executed when +the variable whose name is specified by variableName is read for +the first time. +If the optional argument -array boolean is specified as true, +then the variable specified as variableName is treated as an +array and attempting to read any index of the array causes that +index to be set by the commandPrefix as they are read. +If the optional argument -appendArgs boolean is specified as +false, then the variable name and subnames are not appended to the +commandPrefix before it is evaluated. If the argument +-appendArgs boolean is not specified or is specified as true +then 1 or 2 additional arguments are appended to the commandPrefix. +If -array boolean is specified as true, then 2 arguments are +appended corresponding to the name of the variable and the index, +otherwise 1 argument is appended containing the name of variable. +The commandPrefix code is run in the same scope as the variable +is read.

+
+
+

EXAMPLES

+
+	::lazyset::variable page {apply {{name} {
+		package require http
+		set token [http::geturl http://www.tcl.tk/]
+		set data [http::data $token]
+		return $data
+	}}}
+	puts $page
+
+
+	::lazyset::variable -array true page {apply {{name index} {
+		package require http
+		set token [http::geturl $index]
+		set data [http::data $token]
+		return $data
+	}}}
+	puts $page(http://www.tcl.tk/)
+
+
+	::lazyset::variable -appendArgs false simple {
+		return -level 0 42
+	}
+	puts $simple
+
+
+

AUTHORS

+

Roy Keene

+
+

Bugs, Ideas, Feedback

+

This document, and the package it describes, will undoubtedly contain +bugs and other problems. +Please report such in the category utility of the +Tcllib Trackers. +Please also report any ideas for enhancements you may have for either +package and/or documentation.

+

When proposing code changes, please provide unified diffs, +i.e the output of diff -u.

+

Note further that attachments are strongly preferred over +inlined patches. Attachments can be made by going to the Edit +form of the ticket immediately after its creation, and then using the +left-most button in the secondary navigation bar.

+
+

Category

+

Utility

+
+ +
Index: embedded/www/tcllib/files/modules/log/log.html ================================================================== --- embedded/www/tcllib/files/modules/log/log.html +++ embedded/www/tcllib/files/modules/log/log.html @@ -226,16 +226,14 @@ lsort. The result is one of -1, 0 or 1 or an error. A result of -1 signals that level1 is of less priority than level2. 0 signals that both levels have the same priority. 1 signals that level1 has higher priority than level2.

::log::lvSuppress level {suppress 1}
-

] -(Un)suppresses the output of messages having the specified +

(Un)suppresses the output of messages having the specified level. Unique abbreviations for the level are allowed here too.

::log::lvSuppressLE level {suppress 1}
-

] -(Un)suppresses the output of messages having the specified level or +

(Un)suppresses the output of messages having the specified level or one of lesser priority. Unique abbreviations for the level are allowed here too.

::log::lvIsSuppressed level

Asks the package whether the specified level is currently suppressed. Unique abbreviations of level names are allowed.

Index: embedded/www/tcllib/files/modules/math/math_geometry.html ================================================================== --- embedded/www/tcllib/files/modules/math/math_geometry.html +++ embedded/www/tcllib/files/modules/math/math_geometry.html @@ -200,11 +200,11 @@
  • polygon - like a polyline, but the implicit assumption is that the polyline is closed (if the first and last points do not coincide, the missing segment is automatically added).

  • point set - again a list of an even number of coordinates, but the points are regarded without any ordering.

  • -
  • circle - a list of thtee numbers, the first two are the coordinates of the +

  • circle - a list of three numbers, the first two are the coordinates of the centre and the third is the radius.

  • PROCEDURES

    The package defines the following public procedures:

    @@ -584,12 +584,12 @@

    Circle that may or may not be intersected

    ::math::geometry::intersectionCircleWithCircle circle1 circle2

    Determine the points at which the given two circles intersect. There can be zero, one or two points. (If the two circles touch the circle or are very close, -then one point is returned. An arbitrary margin of 1.0e-10 times the radius of -the first circle is used to determine this situation.)

    +then one point is returned. An arbitrary margin of 1.0e-10 times the mean of the radii of +the two circles is used to determine this situation.)

    list circle1

    First circle

    list circle2

    Second circle

    Index: embedded/www/tcllib/files/modules/math/numtheory.html ================================================================== --- embedded/www/tcllib/files/modules/math/numtheory.html +++ embedded/www/tcllib/files/modules/math/numtheory.html @@ -1,5 +1,6 @@ +
    +
    [ + Main Table Of Contents +| Table Of Contents +| Keyword Index +| Categories +| Modules +| Applications + ]
    +
    +

    math::trig(n) 1.0.0 tcllib "Tcl Math Library"

    +

    Name

    +

    math::trig - Trigonometric anf hyperbolic functions

    +
    + + +

    Description

    +

    The math::trig package defines a set of trigonomic and hyperbolic functions +and their inverses. In addition it defines versions of the trigonomic functions +that take arguments in degrees instead of radians.

    +

    For easy use these functions may be imported into the tcl::mathfunc namespace, +so that they can be used directly in the expr command.

    +
    +

    FUNCTIONS

    +

    The functions radian_reduced and degree_reduced return a reduced angle, in +respectively radians and degrees, in the intervals [0, 2pi) and [0, 360):

    +
    +
    ::math::trig::radian_reduced angle
    +

    Return the equivalent angle in the interval [0, 2pi).

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    ::math::trig::degree_reduced angle
    +

    Return the equivalent angle in the interval [0, 360).

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    +

    The following trigonomic functions are defined in addition to the ones defined +in the expr command:

    +
    +
    ::math::trig::cosec angle
    +

    Calculate the cosecant of the angle (1/cos(angle))

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    ::math::trig::sec angle
    +

    Calculate the secant of the angle (1/sin(angle))

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    ::math::trig::cotan angle
    +

    Calculate the cotangent of the angle (1/tan(angle))

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    +

    For these functions also the inverses are defined:

    +
    +
    ::math::trig::acosec value
    +

    Calculate the arc cosecant of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::asec value
    +

    Calculate the arc secant of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::acotan value
    +

    Calculate the arc cotangent of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    +

    The following hyperbolic and inverse hyperbolic functions are defined:

    +
    +
    ::math::trig::cosech value
    +

    Calculate the hyperbolic cosecant of the value (1/sinh(value))

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::sech value
    +

    Calculate the hyperbolic secant of the value (1/cosh(value))

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::cotanh value
    +

    Calculate the hyperbolic cotangent of the value (1/tanh(value))

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::asinh value
    +

    Calculate the arc hyperbolic sine of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::acosh value
    +

    Calculate the arc hyperbolic cosine of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::atanh value
    +

    Calculate the arc hyperbolic tangent of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::acosech value
    +

    Calculate the arc hyperbolic cosecant of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::asech value
    +

    Calculate the arc hyperbolic secant of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::acotanh value
    +

    Calculate the arc hyperbolic cotangent of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    +

    The following versions of the common trigonometric functions and their +inverses are defined:

    +
    +
    ::math::trig::sind angle
    +

    Calculate the sine of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    ::math::trig::cosd angle
    +

    Calculate the cosine of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    ::math::trig::tand angle
    +

    Calculate the cotangent of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    ::math::trig::cosecd angle
    +

    Calculate the cosecant of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    ::math::trig::secd angle
    +

    Calculate the secant of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    ::math::trig::cotand angle
    +

    Calculate the cotangent of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    +
    +

    Bugs, Ideas, Feedback

    +

    This document, and the package it describes, will undoubtedly contain +bugs and other problems. +Please report such in the category math :: trig of the +Tcllib Trackers. +Please also report any ideas for enhancements you may have for either +package and/or documentation.

    +

    When proposing code changes, please provide unified diffs, +i.e the output of diff -u.

    +

    Note further that attachments are strongly preferred over +inlined patches. Attachments can be made by going to the Edit +form of the ticket immediately after its creation, and then using the +left-most button in the secondary navigation bar.

    +
    + +

    Category

    +

    Mathematics

    +
    + +
    Index: embedded/www/tcllib/files/modules/namespacex/namespacex.html ================================================================== --- embedded/www/tcllib/files/modules/namespacex/namespacex.html +++ embedded/www/tcllib/files/modules/namespacex/namespacex.html @@ -97,84 +97,160 @@ | Categories | Modules | Applications ]
    -

    namespacex(n) 0.1 tcllib "Namespace utility commands"

    +

    namespacex(n) 0.2 tcllib "Namespace utility commands"

    Name

    namespacex - Namespace utility commands

    Description

    This package provides a number of utility commands for working with -namespaces.

    +namespaces. +The commands fall into four categories:

    +
      +
    1. Hook commands provide and manipulate a chain of commands which +replaces the single regular namespace unknown handler.

    2. +
    3. An import command provides the ability to import any command +from another namespace.

    4. +
    5. Information commands allow querying of variables and child +namespaces.

    6. +
    7. State commands provide a means to serialize variable values in +a namespace.

    8. +
    -

    API

    +

    Commands

    ::namespacex hook add ?namespace? cmdprefix
    -
    +

    Adds the cmdprefix to the chain of unknown command handlers that +are invoked when the namespace would otherwise invoke its +unknown handler. +If namespace is not specified, then cmdprefix is added to +the chain of handlers for the namespace of the caller.

    +

    The chain of cmdprefix are executed in reverse order of +addition, i.e. the most recently added cmdprefix is +executed first. +When executed, cmdprefix has additional arguments appended to it +as would any namespace unknown handler.

    ::namespacex hook proc ?namespace? arguments body
    -
    +

    Adds an anonymous procedure to the chain of namespace unknown handlers +for the namespace.

    +

    If namespace is not specified, then the handler is added +to the chain of handlers for the namespace of the caller.

    +

    The arguments and body are specified as for the +core proc command.

    ::namespacex hook on ?namespace? guardcmdprefix actioncmdprefix
    -
    +

    Adds a guarded action to the chain of namespace unknown handlers for +the namespace.

    +

    If namespace is not specified, then the handler is added +to the chain of handlers for the namespace of the caller.

    +

    The guardcmdprefix is executed first. If it returns a +value that can be interpreted as false, then the next unknown hander +in the chain is executed. Otherwise, actioncmdprefix is executed +and the return value of the handler is the value returned by +actioncmdprefix.

    +

    When executed, both guardcmdprefix and +actioncmdprefix have the same additional arguments appended as +for any namespace unknown handler.

    ::namespacex hook next arg...
    -
    -
    ::namespacex info allchildren namespace
    -

    This command returns a list containing the names of all child -namespaces in the specified namespace and its children. The -names are all fully qualified.

    -
    ::namespacex info allvars namespace
    -

    This command returns a list containing the names of all variables in -the specified namespace and its children. The names are all -relative to namespace, and not fully qualified.

    -
    ::namespacex info vars namespace ?pattern?
    -

    This command returns a list containing the names of all variables in -the specified namespace.

    -
    ::namespacex state get namespace
    -

    This command returns a dictionary holding the names and values of all -variables in the specified namespace and its child namespaces.

    -

    Note that the names are all relative to namespace, -and not fully qualified.

    -
    ::namespacex state set namespace dict
    -

    This command takes a dictionary holding the names and values for a set -of variables and replaces the current state of the specified -namespace and its child namespaces with this state. -The result of the command is the empty string.

    -
    ::namespacex state drop namespace
    -

    This command unsets all variables in the specified namespace and -its child namespaces. -The result of the command is the empty string.

    -
    +

    This command is available to namespace hooks to execute the next hook +in the chain of handlers for the namespace.

    +
    ::namespacex import fromns cmdname ?newname ...?
    +

    Imports the command cmdname from the fromns namespace into +the namespace of the caller. +The cmdname command is imported even if the fromns did not +originally export the command.

    +

    If newname is specified, then the imported command will +be known by that name. Otherwise, the command retains is original name +as given by cmdname.

    +

    Additional pairs of cmdname / newname arguments may +also be specified.

    +
    ::namespacex info allchildren namespace
    +

    Returns a list containing the names of all child namespaces in the +specified namespace and its children. The names are all fully +qualified.

    +
    ::namespacex info allvars namespace
    +

    Returns a list containing the names of all variables in the specified +namespace and its children. The names are all given relative to +namespace, and not fully qualified.

    +
    ::namespacex normalize namespace
    +

    Returns the absolute name of namespace, which is resolved +relative to the namespace of the caller, with all unneeded colon +characters removed.

    +
    ::namespacex info vars namespace ?pattern?
    +

    Returns a list containing the names of all variables in +the specified namespace. +If the pattern argument is specified, then only variables +matching pattern are returned. Matching is determined using the +same rules as for string match.

    +
    ::namespacex state get namespace
    +

    Returns a dictionary holding the names and values of all variables in +the specified namespace and its child namespaces.

    +

    Note that the names are all relative to namespace, and +not fully qualified.

    +
    ::namespacex state set namespace dict
    +

    Takes a dictionary holding the names and values for a set of variables +and replaces the current state of the specified namespace and +its child namespaces with this state. +The result of the command is the empty string.

    +
    ::namespacex state drop namespace
    +

    Unsets all variables in the specified namespace and its child +namespaces. +The result of the command is the empty string.

    +
    ::namespacex strip prefix namespaces
    +

    Each item in namespaces must be the absolute normalized name of +a child namespace of namespace prefix. +Returns the corresponding list of relative names of child namespaces.

    +
    +
    +

    Bugs, Ideas, Feedback

    +

    This document, and the package it describes, will undoubtedly contain +bugs and other problems. +Please report such in the category namespacex of the +Tcllib Trackers. +Please also report any ideas for enhancements you may have for either +package and/or documentation.

    +

    When proposing code changes, please provide unified diffs, +i.e the output of diff -u.

    +

    Note further that attachments are strongly preferred over +inlined patches. Attachments can be made by going to the Edit +form of the ticket immediately after its creation, and then using the +left-most button in the secondary navigation bar.

    Keywords

    extended namespace, info, namespace unknown, namespace utilities, state (de)serialization, unknown hooking, utilities

    PROCEDURES

    The package defines the following public procedures:

    @@ -593,12 +593,12 @@

    Circle that may or may not be intersected

    ::math::geometry::intersectionCircleWithCircle circle1 circle2

    Determine the points at which the given two circles intersect. There can be zero, one or two points. (If the two circles touch the circle or are very close, -then one point is returned. An arbitrary margin of 1.0e-10 times the radius of -the first circle is used to determine this situation.)

    +then one point is returned. An arbitrary margin of 1.0e-10 times the mean of the radii of +the two circles is used to determine this situation.)

    list circle1

    First circle

    list circle2

    Second circle

    Index: idoc/www/tcllib/files/modules/math/numtheory.html ================================================================== --- idoc/www/tcllib/files/modules/math/numtheory.html +++ idoc/www/tcllib/files/modules/math/numtheory.html @@ -1,5 +1,6 @@ + math::numtheory - Tcl Math Library + + + + +
    [ + Tcllib Home +| Main Table Of Contents +| Table Of Contents +| Keyword Index +| Categories +| Modules +| Applications + ]
    +
    +

    math::trig(n) 1.0.0 tcllib "Tcl Math Library"

    +

    Name

    +

    math::trig - Trigonometric anf hyperbolic functions

    +
    + + +

    Description

    +

    The math::trig package defines a set of trigonomic and hyperbolic functions +and their inverses. In addition it defines versions of the trigonomic functions +that take arguments in degrees instead of radians.

    +

    For easy use these functions may be imported into the tcl::mathfunc namespace, +so that they can be used directly in the expr command.

    +
    +

    FUNCTIONS

    +

    The functions radian_reduced and degree_reduced return a reduced angle, in +respectively radians and degrees, in the intervals [0, 2pi) and [0, 360):

    +
    +
    ::math::trig::radian_reduced angle
    +

    Return the equivalent angle in the interval [0, 2pi).

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    ::math::trig::degree_reduced angle
    +

    Return the equivalent angle in the interval [0, 360).

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    +

    The following trigonomic functions are defined in addition to the ones defined +in the expr command:

    +
    +
    ::math::trig::cosec angle
    +

    Calculate the cosecant of the angle (1/cos(angle))

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    ::math::trig::sec angle
    +

    Calculate the secant of the angle (1/sin(angle))

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    ::math::trig::cotan angle
    +

    Calculate the cotangent of the angle (1/tan(angle))

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    +

    For these functions also the inverses are defined:

    +
    +
    ::math::trig::acosec value
    +

    Calculate the arc cosecant of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::asec value
    +

    Calculate the arc secant of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::acotan value
    +

    Calculate the arc cotangent of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    +

    The following hyperbolic and inverse hyperbolic functions are defined:

    +
    +
    ::math::trig::cosech value
    +

    Calculate the hyperbolic cosecant of the value (1/sinh(value))

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::sech value
    +

    Calculate the hyperbolic secant of the value (1/cosh(value))

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::cotanh value
    +

    Calculate the hyperbolic cotangent of the value (1/tanh(value))

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::asinh value
    +

    Calculate the arc hyperbolic sine of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::acosh value
    +

    Calculate the arc hyperbolic cosine of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::atanh value
    +

    Calculate the arc hyperbolic tangent of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::acosech value
    +

    Calculate the arc hyperbolic cosecant of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::asech value
    +

    Calculate the arc hyperbolic secant of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    ::math::trig::acotanh value
    +

    Calculate the arc hyperbolic cotangent of the value

    +
    +
    float value
    +

    Value of the argument

    +
    +
    +

    The following versions of the common trigonometric functions and their +inverses are defined:

    +
    +
    ::math::trig::sind angle
    +

    Calculate the sine of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    ::math::trig::cosd angle
    +

    Calculate the cosine of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in radians)

    +
    +
    ::math::trig::tand angle
    +

    Calculate the cotangent of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    ::math::trig::cosecd angle
    +

    Calculate the cosecant of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    ::math::trig::secd angle
    +

    Calculate the secant of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    ::math::trig::cotand angle
    +

    Calculate the cotangent of the angle (in degrees)

    +
    +
    float angle
    +

    Angle (in degrees)

    +
    +
    +
    +

    Bugs, Ideas, Feedback

    +

    This document, and the package it describes, will undoubtedly contain +bugs and other problems. +Please report such in the category math :: trig of the +Tcllib Trackers. +Please also report any ideas for enhancements you may have for either +package and/or documentation.

    +

    When proposing code changes, please provide unified diffs, +i.e the output of diff -u.

    +

    Note further that attachments are strongly preferred over +inlined patches. Attachments can be made by going to the Edit +form of the ticket immediately after its creation, and then using the +left-most button in the secondary navigation bar.

    +
    + +

    Category

    +

    Mathematics

    +
    + +
    Index: idoc/www/tcllib/files/modules/namespacex/namespacex.html ================================================================== --- idoc/www/tcllib/files/modules/namespacex/namespacex.html +++ idoc/www/tcllib/files/modules/namespacex/namespacex.html @@ -106,84 +106,160 @@ | Categories | Modules | Applications ]
    -

    namespacex(n) 0.1 tcllib "Namespace utility commands"

    +

    namespacex(n) 0.2 tcllib "Namespace utility commands"

    Name

    namespacex - Namespace utility commands

    Description

    This package provides a number of utility commands for working with -namespaces.

    +namespaces. +The commands fall into four categories:

    +
      +
    1. Hook commands provide and manipulate a chain of commands which +replaces the single regular namespace unknown handler.

    2. +
    3. An import command provides the ability to import any command +from another namespace.

    4. +
    5. Information commands allow querying of variables and child +namespaces.

    6. +
    7. State commands provide a means to serialize variable values in +a namespace.

    8. +
    -

    API

    +

    Commands

    ::namespacex hook add ?namespace? cmdprefix
    -
    +

    Adds the cmdprefix to the chain of unknown command handlers that +are invoked when the namespace would otherwise invoke its +unknown handler. +If namespace is not specified, then cmdprefix is added to +the chain of handlers for the namespace of the caller.

    +

    The chain of cmdprefix are executed in reverse order of +addition, i.e. the most recently added cmdprefix is +executed first. +When executed, cmdprefix has additional arguments appended to it +as would any namespace unknown handler.

    ::namespacex hook proc ?namespace? arguments body
    -
    +

    Adds an anonymous procedure to the chain of namespace unknown handlers +for the namespace.

    +

    If namespace is not specified, then the handler is added +to the chain of handlers for the namespace of the caller.

    +

    The arguments and body are specified as for the +core proc command.

    ::namespacex hook on ?namespace? guardcmdprefix actioncmdprefix
    -
    +

    Adds a guarded action to the chain of namespace unknown handlers for +the namespace.

    +

    If namespace is not specified, then the handler is added +to the chain of handlers for the namespace of the caller.

    +

    The guardcmdprefix is executed first. If it returns a +value that can be interpreted as false, then the next unknown hander +in the chain is executed. Otherwise, actioncmdprefix is executed +and the return value of the handler is the value returned by +actioncmdprefix.

    +

    When executed, both guardcmdprefix and +actioncmdprefix have the same additional arguments appended as +for any namespace unknown handler.

    ::namespacex hook next arg...
    -
    -
    ::namespacex info allchildren namespace
    -

    This command returns a list containing the names of all child -namespaces in the specified namespace and its children. The -names are all fully qualified.

    -
    ::namespacex info allvars namespace
    -

    This command returns a list containing the names of all variables in -the specified namespace and its children. The names are all -relative to namespace, and not fully qualified.

    -
    ::namespacex info vars namespace ?pattern?
    -

    This command returns a list containing the names of all variables in -the specified namespace.

    -
    ::namespacex state get namespace
    -

    This command returns a dictionary holding the names and values of all -variables in the specified namespace and its child namespaces.

    -

    Note that the names are all relative to namespace, -and not fully qualified.

    -
    ::namespacex state set namespace dict
    -

    This command takes a dictionary holding the names and values for a set -of variables and replaces the current state of the specified -namespace and its child namespaces with this state. -The result of the command is the empty string.

    -
    ::namespacex state drop namespace
    -

    This command unsets all variables in the specified namespace and -its child namespaces. -The result of the command is the empty string.

    -
    +

    This command is available to namespace hooks to execute the next hook +in the chain of handlers for the namespace.

    +
    ::namespacex import fromns cmdname ?newname ...?
    +

    Imports the command cmdname from the fromns namespace into +the namespace of the caller. +The cmdname command is imported even if the fromns did not +originally export the command.

    +

    If newname is specified, then the imported command will +be known by that name. Otherwise, the command retains is original name +as given by cmdname.

    +

    Additional pairs of cmdname / newname arguments may +also be specified.

    +
    ::namespacex info allchildren namespace
    +

    Returns a list containing the names of all child namespaces in the +specified namespace and its children. The names are all fully +qualified.

    +
    ::namespacex info allvars namespace
    +

    Returns a list containing the names of all variables in the specified +namespace and its children. The names are all given relative to +namespace, and not fully qualified.

    +
    ::namespacex normalize namespace
    +

    Returns the absolute name of namespace, which is resolved +relative to the namespace of the caller, with all unneeded colon +characters removed.

    +
    ::namespacex info vars namespace ?pattern?
    +

    Returns a list containing the names of all variables in +the specified namespace. +If the pattern argument is specified, then only variables +matching pattern are returned. Matching is determined using the +same rules as for string match.

    +
    ::namespacex state get namespace
    +

    Returns a dictionary holding the names and values of all variables in +the specified namespace and its child namespaces.

    +

    Note that the names are all relative to namespace, and +not fully qualified.

    +
    ::namespacex state set namespace dict
    +

    Takes a dictionary holding the names and values for a set of variables +and replaces the current state of the specified namespace and +its child namespaces with this state. +The result of the command is the empty string.

    +
    ::namespacex state drop namespace
    +

    Unsets all variables in the specified namespace and its child +namespaces. +The result of the command is the empty string.

    +
    ::namespacex strip prefix namespaces
    +

    Each item in namespaces must be the absolute normalized name of +a child namespace of namespace prefix. +Returns the corresponding list of relative names of child namespaces.

    +
    +
    +

    Bugs, Ideas, Feedback

    +

    This document, and the package it describes, will undoubtedly contain +bugs and other problems. +Please report such in the category namespacex of the +Tcllib Trackers. +Please also report any ideas for enhancements you may have for either +package and/or documentation.

    +

    When proposing code changes, please provide unified diffs, +i.e the output of diff -u.

    +

    Note further that attachments are strongly preferred over +inlined patches. Attachments can be made by going to the Edit +form of the ticket immediately after its creation, and then using the +left-most button in the secondary navigation bar.

    Keywords

    extended namespace, info, namespace unknown, namespace utilities, state (de)serialization, unknown hooking, utilities