category::tagcloud::get_minmax_tagweights (private)

 category::tagcloud::get_minmax_tagweights -tag_list tag_list

Defined in packages/categories/tcl/tagcloud-procs.tcl

Returns a list with the minimum and maximum weight values in the given list.

Switches:
-tag_list
(required)
Author:
Matthew Burke <matt-oacs@bluedino.net>

Partial Call Graph (max 5 caller/called nodes):
%3 category::tagcloud::tagcloud category::tagcloud::tagcloud (public) category::tagcloud::get_minmax_tagweights category::tagcloud::get_minmax_tagweights category::tagcloud::tagcloud->category::tagcloud::get_minmax_tagweights

Testcases:
No testcase defined.
Source code:
    set max_weight 0
    set min_weight [lindex $tag_list 0 1]
    foreach tag $tag_list {
        set tag_weight [lindex $tag 1]
        if {$tag_weight < $min_weight} {
            set min_weight $tag_weight
        }
        if {$tag_weight > $max_weight} {
            set max_weight $tag_weight
        }
    }
    return [list $min_weight $max_weight]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ]
Show another procedure: