Programming Topic


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Programming Topic
# 1  
Old 02-18-2011
Programming Topic

Greetings friends, I was looking for something about <i>Lua Script Language<i/> and I didn'y find anything, and then I had a thought that It'd be easy if in the Programming Topic there are subtopics with is organized by programming languages.

Just a thought
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

How to close a topic?

No wonder that so few topics are closed. Looking for the fourth time as I do not find! (4 Replies)
Discussion started by: popescu1954
4 Replies

2. News, Links, Events and Announcements

New off topic forum

we now have an off topic forum here : https://www.unix.com/forumdisplay.php?s=&forumid=54 everyone say thanks to Neo!:p (0 Replies)
Discussion started by: norsk hedensk
0 Replies
Login or Register to Ask a Question
TM::Graph(3pm)						User Contributed Perl Documentation					    TM::Graph(3pm)

NAME
TM::Graph - Topic Maps, trait for graph-like operations SYNOPSIS
use TM::Materialized::AsTMa; my $tm = new TM::Materialized::AsTMa (file => 'old_testament.atm'); $tm->sync_in; Class::Trait->apply ( $tm => 'TM::Graph' ); # find groups of topics connected print Dumper $tm->clusters; # use association types to compute a hull print "friends of Mr. Cairo: ". Dumper [ $tm->frontier ([ $tm_>tid ('mr-cairo') ], [ [ $tm->tids ('foaf') ] ]) ]; # see whether there is a link (direct print "I always knew it" if $tm->is_path ( [ 'gw-bush' ], # there could be more (bless [ [ 'foaf' ] ], '*'), 'osama-bin-laden'); DESCRIPTION
Obviously a topic map is also a graph, the topics being the nodes, and the associations forming the edges, albeit these connections connect not always only two nodes, but, ok, you should know TMs by now. This package provides some functions which focus more on the graph-like nature of Topic Maps. INTERFACE
Methods This trait provides the following methods: clusters $hashref = clusters ($tm) computes the islands of topics. It figures out which topics are connected via associations and - in case they are - will collate them into clusters. The result is a hash reference to a hash containing list references of topic ids organized in a cluster. In default mode, this function only regards topics to be in the same cluster if topics play roles in one and the same maplet. The role topics themselves or the type or the scope are ignored. You can change this behaviour by passing in options like use_scope => 1 use_roles => 1 use_type => 1 Obviously, with "use_scope => 1" you will let a lot of topics collapse into one cluster as most maplets usually are in the unconstrained scope. NOTE: This is yet a somewhat expensive operation. frontier @hull = $tm->frontier (@start_lids, $path_spec) This method computes a qualified hull, i.e. a list of all topics which are reachable from @start_lids via a path specified by $path_spec. The path specification is a (recursive) data structure, describing sequences, alternatives and repetition (the "*" operator), all encoded as lists of lists. The topics in that path specification are interpreted as assertion types. Example (reformatting for better reading): # a single step: start knows ... [ ] # outer level: sequence (there is only one) [ 'knows' ] # inner level: alternatives (there is only one) # two subsequent steps: start knows ... isa ... [ ] # outer level: two entries [ 'knows' ], [ 'isa' ] # inner level, one entry each # repetition: start knows ... knows ... knows ... ad infinitum bless [ ], '*' # outer level: one entry, but blessed [ 'knows' ] # inner level # alternatives: start knows | hates ... [ ] # outer level: one entry [ 'knows', 'hates' ] # inner level: alternatives # nesting: first follow an 'eats', then any number of 'begets' [ ] [ 'eats' ], [ ] bless [ ], '*' [ 'begets' ] NOTE: All tids have to be made map-absolute with "tids". NOTE: Cycles are detected. NOTE: I am not sure how this performs at rather large graphs, uhm, maps. is_path $bool = $tm->is_path (@start_lids, $path_spec, $end_lid) This method returns 1 if there is a path from start_lids to end_lid via the path specification. See frontier for that one. neighborhood @neighbors = $tm->neighborhood ($MAXDEPTH, @start_lids) This method returns a list of neighbors for the given start LIDs. In that it follows paths with the maximal length given as first parameter. In any case the path with length 0 is returned, which includes any of the starting nodes. Each neighbor is represented by a hash (reference) with the "path" and the "end" LID. The path is a list (reference) holding the LIDs of the association types visited along the path. SEE ALSO
TM COPYRIGHT AND LICENSE
Copyright 200[78] by Robert Barta, <drrho@cpan.org> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-04-05 TM::Graph(3pm)