Invariant_(computer_science) Invariant_(computer_science)

Invariant (computer science) - Definition and Overview

In computer science, optimising compilers and the methodology of design by contract pay close attention to invariant quantities in computer programs, where the set of transformations involved is the execution of the steps of the computer program.

A loop invariant is a constraint on the input to a loop that should be satisfied by every iteration of the loop.

A class invariant is a constraint on the state of an object that should be satisfied by every method of the class.

Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.