Principe de substitution de Liskovvignette|Barbara Liskov en 2010 Le principe de substitution de Liskov (LSP) est, en programmation orientée objet, une définition particulière de la notion de sous-type. Il a été formulé par Barbara Liskov et Jeannette Wing dans un article intitulé Family Values: A Behavioral Notion of Subtyping : Liskov et Wing en ont proposé la formulation condensée suivante : Si est une propriété démontrable pour tout objet de type , alors est vraie pour tout objet de type tel que est un sous-type de .
SubtypingIn programming language theory, subtyping (also subtype polymorphism or inclusion polymorphism) is a form of type polymorphism in which a subtype is a datatype that is related to another datatype (the supertype) by some notion of substitutability, meaning that program elements, typically subroutines or functions, written to operate on elements of the supertype can also operate on elements of the subtype. If S is a subtype of T, the subtyping relation (written as S
Array (data type)In computer science, array is a data type that represents a collection of elements (values or variables), each selected by one or more indices (identifying keys) that can be computed at run time during program execution. Such a collection is usually called an array variable or array value. By analogy with the mathematical concepts vector and matrix, array types with one and two indices are often called vector type and matrix type, respectively. More generally, a multidimensional array type can be called a tensor type, by analogy with the physical concept, tensor.
Is-aAn is-a relationship is when one type of object 'is a' instance of another type of object. For example, a cat 'is a' animal, but not vice versa. All cats are animals, but not all animals are cats. The concept becomes important in object oriented programing, where 'is a' relationships are often used as a way to structure code - behaviour that are is relevant to all animals is defined on an animal class, whereas behaviour that is relevant only for cats is defined in a cat class.
Type systemIn computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type (for example, integer, floating point, string) to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer program, such as variables, expressions, functions, or modules. A type system dictates the operations that can be performed on a term. For variables, the type system determines the allowed values of that term.
Bounds checkingIn computer programming, bounds checking is any method of detecting whether a variable is within some bounds before it is used. It is usually used to ensure that a number fits into a given type (range checking), or that a variable being used as an array index is within the bounds of the array (index checking). A failed bounds check usually results in the generation of some sort of exception signal. As performing bounds checking during each use can be time-consuming, it is not always done.
Applet JavaUn applet Java est un applet, fournie aux utilisateurs sous la forme de bytecode Java. Un applet Java peut fonctionner dans un navigateur web, grâce à une machine virtuelle Java (JVM), ou dans l'AppletViewer de Sun, un outil permettant de tester les applets Java. Les applets Java ont été introduits dans la première version du langage, de 1995. Les applets Java sont la plupart du temps écrits en langage Java, mais ils peuvent également être écrits dans n'importe quel langage qui se compile en bytecode, comme Jython, Groovy ou encore Scala.
Java (langage)Java est un langage de programmation de haut niveau orienté objet créé par James Gosling et Patrick Naughton, employés de Sun Microsystems, avec le soutien de Bill Joy (cofondateur de Sun Microsystems en 1982), présenté officiellement le au SunWorld. La société Sun est rachetée en 2009 par la société Oracle qui détient et maintient désormais Java. Un logiciel écrit en language Java a pour particularité d'être compilé vers un code intermédiaire formé de bytecodes qui peut être exécutée dans une machine virtuelle Java (JVM) en faisant abstraction du système d'exploitation.
Java (technique)Java est une technique informatique développée initialement par Sun Microsystems puis acquise par Oracle à la suite du rachat de l'entreprise. Défini à l'origine comme un langage de programmation, Java a évolué pour devenir un ensemble cohérent d'éléments techniques et non techniques.
Java version historyThe Java language has undergone several changes since JDK 1.0 as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java language has been governed by the Java Community Process (JCP), which uses Java Specification Requests (JSRs) to propose and specify additions and changes to the Java platform. The language is specified by the Java Language Specification (JLS); changes to the JLS are managed under JSR 901.
CovarianceEn théorie des probabilités et en statistique, la covariance entre deux variables aléatoires est un nombre permettant de quantifier leurs écarts conjoints par rapport à leurs espérances respectives. Elle s’utilise également pour deux séries de données numériques (écarts par rapport aux moyennes). La covariance de deux variables aléatoires indépendantes est nulle, bien que la réciproque ne soit pas toujours vraie. La covariance est une extension de la notion de variance.
Machine virtuelle Javavignette|Machine virtuelle Java - Spécification Java 7 La machine virtuelle Java (en anglais Java virtual machine, abr. JVM) est un appareil informatique fictif qui exécute des programmes compilés sous forme de bytecode Java. L'appareil est simulé par un logiciel spécifique à chaque plateforme ou couple (machine/système d’exploitation) et permet aux applications Java compilées en bytecode de produire les mêmes résultats quelle que soit la plate-forme, tant que celle-ci est pourvue de la machine virtuelle Java adéquate.
Bytecode JavaLe bytecode Java est un bytecode destiné à regrouper des instructions exécutables par une machine virtuelle Java. Par extension, il désigne un flux d'octets binaire au format d'une classe Java. Ce flux est habituellement le résultat de la compilation d'un code source, ce code source n'étant pas obligatoirement écrit en langage Java. Ce bytecode peut être exécuté sous de nombreux systèmes d'exploitation par une machine virtuelle Java.
Java syntaxThe syntax of Java is the set of rules defining how a Java program is written and interpreted. The syntax is mostly derived from C and C++. Unlike in C++, in Java there are no global functions or variables, but there are data members which are also regarded as global variables. All code belongs to classes and all values are objects. The only exception is the primitive types, which are not represented by a class instance for performance reasons (though can be automatically converted to objects and vice versa via autoboxing).
Covariance matrixIn probability theory and statistics, a covariance matrix (also known as auto-covariance matrix, dispersion matrix, variance matrix, or variance–covariance matrix) is a square matrix giving the covariance between each pair of elements of a given random vector. Any covariance matrix is symmetric and positive semi-definite and its main diagonal contains variances (i.e., the covariance of each element with itself). Intuitively, the covariance matrix generalizes the notion of variance to multiple dimensions.
Variance (mathématiques)vignette|Exemple d'échantillons pour deux populations ayant la même moyenne mais des variances différentes. La population en rouge a une moyenne de 100 et une variance de 100 (écart-type = SD = standard deviation = 10). La population en bleu a une moyenne de 100 et une variance de (écart-type = SD = 50). En statistique et en théorie des probabilités, la variance est une mesure de la dispersion des valeurs d'un échantillon ou d'une variable aléatoire.
GénéricitéEn programmation, la généricité (ou programmation générique), consiste à définir des algorithmes identiques opérant sur des données de types différents. On définit de cette façon des procédures ou des types entiers génériques. On pourrait ainsi programmer une pile, ou une procédure qui prend l'élément supérieur de la pile, indépendamment du type de données contenues. C'est donc une forme de polymorphisme, le « polymorphisme de type » dit aussi « paramétrage de type » : en effet, le type de donnée général (abstrait) apparaît comme un paramètre des algorithmes définis, avec la particularité que ce paramètre-là est un type.
Polymorphisme (informatique)En informatique et en théorie des types, le polymorphisme, du grec ancien polús (plusieurs) et morphê (forme), est le concept consistant à fournir une interface unique à des entités pouvant avoir différents types. Par exemple, des opérations telles que la multiplication peuvent ainsi être étendues à des scalaires aux vecteurs ou aux matrices, l'addition, des scalaires aux fonctions ou aux chaînes de caractères, etc.
Système nominatif de typesUn système nominatif de types est une classe majeure de système de types en programmation informatique. C'est avec lui qu'on détermine la compatibilité et l'équivalence de types par la déclaration explicite et/ou le nommage des types. On utilise les systèmes nominatifs pour déterminer si des types sont équivalents ou pour savoir si un type est un sous-type d'un autre. Ce système est en contraste avec le système structurel, où les comparaisons sont fondées sur la structure des types en question et donc ces types ne nécessitent pas de déclarations explicites.
Sample mean and covarianceThe sample mean (sample average) or empirical mean (empirical average), and the sample covariance or empirical covariance are statistics computed from a sample of data on one or more random variables. The sample mean is the average value (or mean value) of a sample of numbers taken from a larger population of numbers, where "population" indicates not number of people but the entirety of relevant data, whether collected or not. A sample of 40 companies' sales from the Fortune 500 might be used for convenience instead of looking at the population, all 500 companies' sales.