.\" ident @(#)Array_alg:man/fill.3 3.2 .\" .\" C++ Standard Components, Release 3.0. .\" .\" Copyright (c) 1991, 1992 AT&T and UNIX System Laboratories, Inc. .\" Copyright (c) 1988, 1989, 1990 AT&T. All Rights Reserved. .\" .\" THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and UNIX System .\" Laboratories, Inc. The copyright notice above does not evidence .\" any actual or intended publication of such source code. .\" .TH \f3fill\fP \f3Array_alg(3C++)\fP " " .SH NAME fill \- assign a given value to all locations in an array .SH SYNOPSIS OF Array_alg.h .Bf template void fill(const \*(gt& val,\*(gt* b,\*(gt* e); .Be .SH ASSUMPTIONS .PP (1) \*(gt has \f4operator=\f1 .SH DESCRIPTION .PP Assigns the value \f4val\f1 to every location in the array. .SH COMPLEXITY .PP If \f2N\f1 is the size of the array, then complexity is \f2O(N)\f1. Exactly \f2N\f1 assignments are done. .SH NOTES Because a Block (see \f3Block(3C++)\f1) can always be used wherever an array is called for, Array Algorithms can also be used with Blocks. In fact, these two components were actually designed to be used together. .SH SEE ALSO .Bf \f3intro(.)\f1 \f3for_each(.)\f1 \f3generate(.)\f1 \f3subs(.)\f1 \f3Block(3C++)\f1 .Be