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

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

πŸ’– RDF::T...::Graph(3pm) πŸ’–

okay bestie so this is the manual page for RDF::T...::Graph from the User Contributed Perl Documentation, and it's literally all about materialized RDF graphs for testing isomorphism. yes we're doing graph math today, put your hair up πŸ’…


✨ NAME ✨

RDF::Trine::Graph β€” Materialized RDF Graphs for testing isomorphism πŸ¦‹


🌸 VERSION 🌸

This document describes RDF::Trine::Graph version 1.019. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

use RDF::Trine::Graph;
my $a = RDF::Trine::Graph->new( $model_a );
my $b = RDF::Trine::Graph->new( $model_b );
print "graphs are " . ($a->equals( $b ) ? "the same" : "different");

look at her go 😌 two graphs walk into a bar and we find out if they're the same.


πŸ’œ DESCRIPTION πŸ’œ

RDF::Trine::Graph provdes a mechanism for testing graph isomorphism based on graph triples from either a RDF::Trine::Model or a RDF::Trine::Iterator. (yes it says "provdes" in the original, we are not fixing her, she's iconic as she is πŸ™ˆ)

Isomorphism testing requires materializing all of a graph's triples in memory, and so should be used carefully in situations with large graphs.

🚨 bestie listen. all the triples. in memory. if your graph is huge this is gonna eat your RAM for breakfast 😭 use her carefully, fr fr.

πŸ‘‘ METHODS πŸ‘‘

  • new ( $model )
  • new ( $iterator )

Returns a new graph from the given RDF::Trine::Model or RDF::Trine::Iterator::Graph object. two ways in, same slay energy ✨

  • equals ( $graph )

Returns true if the invocant and $graph represent two equal RDF graphs (e.g. there exists a bijection between the RDF statements of the invocant and $graph). a bijection, bestie. one-to-one. matching energy. πŸ‘‘

  • is_subgraph_of ( $graph )

Returns true if the invocant is a subgraph of $graph. (i.e. there exists an injection of RDF statements from the invocant to $graph.) she's not all of it but she fits inside it 🫢

  • injection_map ( $graph )

If the invocant is a subgraph of $graph, returns a mapping of blank node identifiers from the invocant graph to $graph as a hashref. Otherwise returns false.

πŸ’€ heads up: The solution is not always unique; where there exist multiple solutions, the solution returned is arbitrary. so like... there might be several correct answers and she just hands you whichever one she grabbed first. no cap.
  • split_blank_statements

Returns two array refs, containing triples with blank nodes and triples without any blank nodes, respectively. two piles, one for the blank-node girlies, one for the non-blank-node girlies πŸŽ€

  • get_statements

Returns a RDF::Trine::Iterator::Graph object for the statements in this graph. here's your iterator back, go wild πŸ’…

  • error

Returns an error string explaining the last failed "equal" call. so when equals says no, this one tells you why 😭 iconic duo honestly.


πŸ› BUGS πŸ›

Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>.

not me telling you to go file an issue. do it though, the maintainers are sweet 🫢

🌈 AUTHOR 🌈

Gregory Todd Williams "<gwilliams@cpan.org>" β€” thank you for your service king πŸ‘‘


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.


and that's the whole page, bestie, you ate it up πŸ’– this was perl v5.38.2, dated 2024-01-13, and it's the RDF::T...::Graph(3pm) page β€” now go materialize some graphs, but like, responsibly πŸŒΈβœ¨πŸ¦‹

πŸ“¦ where this page comes from