(object-oriented programming) Using or relating to contravariance.
contravariant
Definitions, parts of speech, synonyms, and sentence examples for contravariant.
Editorial note
This means that `[]` is covariant, while `Relation` and `{}` are contravariant.
Quick take
(object-oriented programming) Using or relating to contravariance.
Meaning at a glance
The clearest senses and uses of contravariant gathered in one view.
(linear algebra, of a vector) Scaling inversely with a change of basis.
(algebra) A bihomogeneous polynomial in dual variables of x, y, ... and the coefficients of some homogeneous form in x, y, ... that is invariant under some group of linear transformations.
Definitions
Core meanings and parts of speech for contravariant.
adjective
(object-oriented programming) Using or relating to contravariance.
adjective
(linear algebra, of a vector) Scaling inversely with a change of basis.
noun
(algebra) A bihomogeneous polynomial in dual variables of x, y, ... and the coefficients of some homogeneous form in x, y, ... that is invariant under some group of linear transformations.
adjective
(category theory, of a functor) Which reverses the order of morphism composition: formally, which associates each morphism f:X→Y to a morphism F(f):F(Y)→F(X).
Example sentences
This means that `[]` is covariant, while `Relation` and `{}` are contravariant.
A small example, function types are contravariant in the negative position in Flow, but bivariant in TS—much weaker!
The IP you know and love contracts over the covariant and contravariant indicies of two rank-1 tensors (vectors).
Also it's not yet fully understood how to take a fix point of a contravariant type constructor.
You need a metric to do this so you can raise one of the contravariant indicies to be covariant.
T is contravariant (negative) if A ≤: B ⇒ T<B> ≤: T<A> (i.e., the other way around).
It has a generics system that makes a lot more sense (allowing covariant/contravariant types, rather than forcing use-site variance everywhere).
In the standard notation the distinction between vector spaces and dual vector spaces manifests itself in covariant and contravariant indices of tensors.
Since these are Euclidean spaces, the difference between contravariant and covariant indices is non-existent.
Here the matrix might be regarded as a rank 1,1 tensor (one covariant, one contravariant index) that you contract with the vector.
And I suspect thst contravariant would not have thought up his model if he hadn't seen mine.
Many times I've spent days trying to figure out what the hell a contravariant functor is, only to get really discouraged.
Quote examples
If you want to talk about contravariance, you can note that when you add a type-class constraint of the form A x => x, you've basically got an implication, and the "A x" is in contravariant position.
In the language of differential geometry, if we're optimizing f(x), then x is "contravariant" but grad(f) is "covariant", so technically we can't just add grad(f) to x since they have different types.
Ultimately, the clearest way to express this idea of data types which have ownership or existence properties is the mapping properties of `Functor` and `Contravariant` (in Haskell terms anyway) instance Functor f where fmap:: (a -> b) -> (f a -> f b) instance Contravariant f where cmap:: (b -> a) -> (f a -> f b) But "owe" and "have" can go a long way as intuition.
I came up with my initial model only because the two constants seemed curiously coincidental with the number of weeks and working days in the year; contravariant's model throws one of those away, which is fine, but I likely would not have proposed my model in the first place if only one constant looked suggestive—a singular "52" does not really get the modeling juices flowing.
Frequently asked questions
Short answers drawn from the clearest meanings and examples for this word.
How do you use contravariant in a sentence?
This means that `[]` is covariant, while `Relation` and `{}` are contravariant.
What does contravariant mean?
(object-oriented programming) Using or relating to contravariance.
What part of speech is contravariant?
contravariant is commonly used as adjective, noun.