RDF::T...Pattern(3pm)

πŸ“¦
version 1.019 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 %bound have been swapped out for their corresponding bound values. glow-up via substitution πŸ’…
  • subsumes ( $statement ) β€” returns true if the pattern will subsume the $statement when 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 calls subgroup, then sort_triples, then merge_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 (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