About: Rank (computer programming)     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : yago:WikicatProgrammingLanguageTopics, within Data Space : dbpedia.org:8891 associated with source document(s)
QRcode icon
http://dbpedia.org:8891/describe/?url=http%3A%2F%2Fdbpedia.org%2Fresource%2FRank_%28computer_programming%29

In computer programming, rank with no further specifications is usually a synonym for (or refers to) "number of dimensions"; thus, a two-dimensional array has rank two, a three-dimensional array has rank three and so on.Strictly, no formal definition can be provided which applies to every programming language, since each of them has its own concepts, semantics and terminology; the term may not even be applicable or, to the contrary, applied with a very specific meaning in the context of a given language. Given the code above the rank of a type T can be calculated at compile time by rank_v

AttributesValues
rdf:type
rdfs:label
  • Rank (computer programming) (en)
rdfs:comment
  • In computer programming, rank with no further specifications is usually a synonym for (or refers to) "number of dimensions"; thus, a two-dimensional array has rank two, a three-dimensional array has rank three and so on.Strictly, no formal definition can be provided which applies to every programming language, since each of them has its own concepts, semantics and terminology; the term may not even be applicable or, to the contrary, applied with a very specific meaning in the context of a given language. Given the code above the rank of a type T can be calculated at compile time by rank_v<T> (en)
dcterms:subject
Wikipage page ID
Wikipage revision ID
Link from a Wikipage to another Wikipage
sameAs
dbp:wikiPageUsesTemplate
has abstract
  • In computer programming, rank with no further specifications is usually a synonym for (or refers to) "number of dimensions"; thus, a two-dimensional array has rank two, a three-dimensional array has rank three and so on.Strictly, no formal definition can be provided which applies to every programming language, since each of them has its own concepts, semantics and terminology; the term may not even be applicable or, to the contrary, applied with a very specific meaning in the context of a given language. In the case of APL the notion applies to every operand; and dyads ("binary functions") have a left rank and a right rank. The box below instead shows how rank of a type and rank of an array expression could be defined (in a semi-formal style) for C++ and illustrates a simple way to calculate them at compile time. #include #include /* Rank of a type * ------------- * * Let the rank of a type T be the number of its dimensions if * it is an array; zero otherwise (which is the usual convention) */template <typename T> struct rank{ static const std::size_t value = 0;};template<typename T, std::size_t N>struct rank<T[N]>{ static const std::size_t value = 1 + rank<T>::value;};template <typename T>constexpr auto rank_v = rank<T>::value;/* Rank of an expression * * Let the rank of an expression be the rank of its type */template <typename T>using unqualified_t = std::remove_cv_t<std::remove_reference_t<T>>; template <typename T>auto rankof(T&& expr){ return rank_v<unqualified_t<T>>;} Given the code above the rank of a type T can be calculated at compile time by rank<T>::value or the shorter form rank_v<T> Calculating the rank of an expression can be done using rankof(expr) (en)
prov:wasDerivedFrom
page length (characters) of wiki page
foaf:isPrimaryTopicOf
is Link from a Wikipage to another Wikipage of
is Wikipage redirect of
is Wikipage disambiguates of
is foaf:primaryTopic of
Faceted Search & Find service v1.17_git139 as of Feb 29 2024


Alternative Linked Data Documents: ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3331 as of Sep 2 2024, on Linux (x86_64-generic-linux-glibc212), Single-Server Edition (62 GB total memory, 44 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software