<commit_before># ifndef CppADCppAD_vectorIncluded
# define CppADCppAD_vectorIncluded

// BEGIN SHORT COPYRIGHT
/* -----------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-05 <NAME>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
------------------------------------------------------------------------ */
// END SHORT COPYRIGHT

/*
$begin CppAD_vector$$
$spell
	resize
	cout
	endl
	std
	Cpp
	const
	vec
	ostream
	elem
$$

$index vector, CppAD template class$$
$index class, template CppAD vector$$
$index template, CppAD vector class$$

$section The CppAD::vector Template Class$$

$table 
$bold Syntax$$ $cnext
$code # include <CppAD/CppAD_vector.h>$$ 
$tend

$fend 25$$


$head Description$$
The include file $code CppAD/CppAD_vector.h$$ defines the
vector template class $code CppAD::vector$$.
This is a $xref/SimpleVector/$$ template class and in addition
it has the features listed below:

$head Include$$
The file $code CppAD/CppAD_vector.h$$ is included by $code CppAD/CppAD.h$$
but it can also be included separately with out the rest of the 
CppAD include files.

$head Assignment$$
$index assignment, CppAD vector$$
If $italic x$$ and $italic y$$ are 
$syntax%CppAD::vector<%Type%>%$$ objects,
$syntax%
	%y% = %x%
%$$
has all the properties listed for a
$xref/SimpleVector/Assignment/simple vector assignment/$$
plus the following:
$pre

$$
The $code CppAD::vector$$ template class will check that
the size of $italic x$$ is equal to the size of $italic y$$
before doing the assignment.
If the sizes are not equal, $code CppAD::vector$$ will use
$xref/CppADError/Description/CppADUsageError/CppADUsageError/1/$$
to generate an appropriate error report.
$pre

$$
A reference to the vector $italic y$$ is returned.
An example use of this reference is in multiple assignments of the form
$syntax%
	%z% = %y% = %x%
%$$

$head Element Access$$
$index [], CppAD vector$$
$index vector, [] CppAD$$
If $italic x$$ is a $syntax%CppAD::vector<%Type%>%$$ object
and $code i$$ has type $code size_t$$,
$syntax%
	%x%[%i%]
%$$
has all the properties listed for a
$xref/SimpleVector/Element Access/simple vector element access/$$
plus the following:
$pre

$$
If $italic i$$ is not less than the size of the $italic x$$,
$code CppAD::vector$$ will use
$xref/CppADError/Description/CppADUsageError/CppADUsageError/1/$$
to generate an appropriate error report.

$head Push Back$$
$index push, CppAD vector$$
$index vector, CppAD push back$$
If $italic x$$ is a $syntax%CppAD::vector<%Type%>%$$ object
with size equal to $italic n$$ and
$code t$$ has type $italic Type$$,
$syntax%
	%x%.push_back(t)
%$$
extends the vector $italic x$$ so that its new size is $italic n$$ plus one
and $syntax%%x%[%n%]%$$ is equal to $italic t$$
(in the sense of the $italic Type$$ assignment operator).

$head Output$$
If $italic x$$ is a $syntax%CppAD::vector<%Type%>%$$ object
and $italic os$$ is an $code std::ostream$$,
and the operation
$syntax%
	%os% << x
%$$
will output the vector $italic x$$ to the standard<commit_msg>correct italic versus code font in some places<commit_after># ifndef CppADCppAD_vectorIncluded
# define CppADCppAD_vectorIncluded

// BEGIN SHORT COPYRIGHT
/* -----------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-05 <NAME>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
------------------------------------------------------------------------ */
// END SHORT COPYRIGHT

/*
$begin CppAD_vector$$
$spell
	resize
	cout
	endl
	std
	Cpp
	const
	vec
	ostream
	elem
$$

$index vector, CppAD template class$$
$index class, template CppAD vector$$
$index template, CppAD vector class$$

$section The CppAD::vector Template Class$$

$table 
$bold Syntax$$ $cnext
$code # include <CppAD/CppAD_vector.h>$$ 
$tend

$fend 25$$


$head Description$$
The include file $code CppAD/CppAD_vector.h$$ defines the
vector template class $code CppAD::vector$$.
This is a $xref/SimpleVector/$$ template class and in addition
it has the features listed below:

$head Include$$
The file $code CppAD/CppAD_vector.h$$ is included by $code CppAD/CppAD.h$$
but it can also be included separately with out the rest of the 
CppAD include files.

$head Assignment$$
$index assignment, CppAD vector$$
If $italic x$$ and $italic y$$ are 
$syntax%CppAD::vector<%Type%>%$$ objects,
$syntax%
	%y% = %x%
%$$
has all the properties listed for a
$xref/SimpleVector/Assignment/simple vector assignment/$$
plus the following:
$pre

$$
The $code CppAD::vector$$ template class will check that
the size of $italic x$$ is equal to the size of $italic y$$
before doing the assignment.
If the sizes are not equal, $code CppAD::vector$$ will use
$xref/CppADError/Description/CppADUsageError/CppADUsageError/1/$$
to generate an appropriate error report.
$pre

$$
A reference to the vector $italic y$$ is returned.
An example use of this reference is in multiple assignments of the form
$syntax%
	%z% = %y% = %x%
%$$

$head Element Access$$
$index [], CppAD vector$$
$index vector, [] CppAD$$
If $italic x$$ is a $syntax%CppAD::vector<%Type%>%$$ object
and $code i$$ has type $code size_t$$,
$syntax%
	%x%[%i%]
%$$
has all the properties listed for a
$xref/SimpleVector/Element Access/simple vector element access/$$
plus the following:
$pre

$$
If $italic i$$ is not less than the size of the $italic x$$,
$code CppAD::vector$$ will use
$xref/CppADError/Description/CppADUsageError/CppADUsageError/1/$$
to generate an appropriate error report.

$head Push Back$$
$index push, CppAD vector$$
$index vector, CppAD push back$$
If $italic x$$ is a $syntax%CppAD::vector<%Type%>%$$ object
with size equal to $italic n$$ and
$italic t$$ has type $italic Type$$,
$syntax%
	%x%.push_back(%t%)
%$$
extends the vector $italic x$$ so that its new size is $italic n$$ plus one
and $syntax%%x%[%n%]%$$ is equal to $italic t$$
(in the sense of the $italic Type$$ assignment operator).

$head Output$$
If $italic x$$ is a $syntax%CppAD::vector<%Type%>%$$ object
and $italic os$$ is an $code std::ostream$$,
and the operation
$syntax%
	%os% << %x%
%$$
will output the vector $italic x$$ to the standard
{'fraction_non_alphanumeric': 0.14709434975171118, 'fraction_numerical': 0.006710508656556167, 'mean_word_length': 3.9285714285714284, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2443474', 'n_tokens_mistral': 2360, 'n_tokens_neox': 2325, 'n_words': 990}