query.system.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-core Show documentation
Show all versions of corese-core Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
select
where {}
export {
function xt:div(?a, ?b) { xsd:integer(floor(?a / ?b)) }
function xt:mod(?a, ?b) { xsd:integer(?a - (?b * xt:div(?a, ?b))) }
function kg:compare(?x, ?y) {
if (?x < ?y, -1,
if (?x > ?y, 1, 0)) }
function xt:prime(?x) {
if (?x = 1, false,
if (?x = 2, true,
! mapany (xt:divisible, ?x, xt:cons(2, xt:iota(3, power(?x, 0.5), 2)))))
}
function xt:divisible(?x, ?n) {
(xt:mod(?x, ?n) = 0)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy