RDF::T...::Graph(3pm)
π 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 β
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
- 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