RDF::T...Pattern(3pm)
π NAME π
okay so RDF::Trine::Pattern β it's the class for basic graph patterns. that's it, that's the vibe. BGP girlies rise π
β¨ VERSION β¨
this doc is describing RDF::Trine::Pattern version 1.019. iykyk π
π«Ά METHODS π«Ά
new ( @triples )β hands you back a brand new BasicGraphPattern structure. that's the whole job bestie, and she does it flawlessly πconstruct_argsβ returns a list of arguments that, if you pass them straight back into this class's constructor, will produce a clone of this algebra pattern. it's giving "here's how to remake me" β¨triplesβ returns the list of triples that belong to this BGP. all of them. the whole squad π¦typeβ listed right here with no description attached, bestie, so that's all we know πsseβ returns the SSE string for this algebra expression. stringify queen πreferenced_variablesβ returns a list of the variable names that get used in this algebra expression. who's in the group chat π¬definite_variablesβ returns a list of the variable names that are gonna be bound after this algebra expression gets evaluated. future-bound icon behavior βcloneβ again, no description in the source, so we're just nodding politely πbind_variables ( \%bound )β returns a new pattern where the variables named in%boundhave been swapped out for their corresponding bound values. glow-up via substitution πsubsumes ( $statement )β returns true if the pattern will subsume the$statementwhen it's matched against a triple store. does she contain multitudes? yes π«Άmerge_patterns ( @patterns )β give it an array of patterns and it merges them all into one. friendship is magic πsort_for_join_variablesβ returns a new pattern object where the subpatterns of the referrant are sorted using heuristics that make sure (a) patterns can be joined on the same variable and (b) then the usual selectivity β aka how quickly the engine can drill down to the answer β of triple patterns. it callssubgroup, thensort_triples, thenmerge_patterns, in that exact order. pipeline queen, no skips π₯subgroupβ splits the pattern object up into an array of pattern objects where the same triple patterns occur. it groups on common variables, so triple patterns that can be joined together end up in a group together. it also groups triples that have no connection to other triples in a group. then it orders the groups: first by number of triples with common variables, then by number of literals, then by the total number of terms that aren't variables. organization is self care πsort_triplesβ sorts the triple patterns using heuristics that look at how many variables the patterns have and where those variables occur. see REFERENCES for the details. returns a new sorted pattern object. alphabetize but make it graph theory π
π BUGS π
please report any bugs or feature requests through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>. tell her directly, she's listening π
πΈ REFERENCES πΈ
the heuristics used to order triple patterns in this module are strongly influenced by The ICS-FORTH Heuristics-based SPARQL Planner (HSP) at <http://www.ics.forth.gr/isl/index_main.php?l=e&c=645>. citation slay β
π AUTHOR π
Gregory Todd Williams "<gwilliams@cpan.org>"
Kjetil Kjernsmo "<kjetilk@cpan.org>"
two icons, one module π
π COPYRIGHT π
Copyright (c) 2006-2012 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. free as in freedom, bestie π¦
okay that's the whole page!! perl v5.38.2, dated 2024-01-13, and this was the RDF::T...Pattern(3pm) page from User Contributed Perl Documentation. go forth and pattern-match, babe π
β¨
π¦ where this page comes from
- debian trixie: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-trine-perl 1.019-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms