CellModules
std.hpp
Go to the documentation of this file.
1
4namespace std {
5
12double log10(double x) {
13
14}
15
22double exp(double x) {
23
24}
25
32double sqrt(double x) {
33
34}
35
43double pow(double base, double exponent) {
44
45}
46
53double sin(double x) {
54
55}
56
63double cos(double x) {
64
65}
66
73double tan(double x) {
74
75}
76
83int abs(int x) {
84
85}
86
93double fabs(double x) {
94
95}
96
103double log(double x) {
104
105}
106
113double acos(double x) {
114
115}
116
123double asin(double x) {
124
125}
126
133double atan(double x) {
134
135}
136
144double atan2(double y, double x) {
145
146}
147
154double cosh(double x) {
155
156}
157
164double sinh(double x) {
165
166}
167
174double tanh(double x) {
175
176}
177
184double ceil(double x) {
185
186}
187
194double floor(double x) {
195
196}
197
205double fmod(double x, double y) {
206
207}
208
215double cbrt(double x) {
216
217}
218
226template <class RandomIt>
227void shuffle(RandomIt first, RandomIt last) {
228
229}
230
237double acosh(double x) {
238
239}
240
247double asinh(double x) {
248
249}
250
257double atanh(double x) {
258
259}
260
261
267iostream cout;
268
274iostream endl;
275
281iostream cerr;
282
283
289template <class T>
290class vector {
291public:
296 // TODO: Implement constructor
297 }
298
304 void push_back(const T& value) {
305
306 }
307
311 void pop_back() {
312
313 }
314
320 size_t size() const {
321
322 }
323
329 T& front() {
330
331 }
332
338 T& back() {
339
340 }
341
347 bool empty() const {
348
349 }
350
354 void clear() {
355
356 }
357
363 void resize(size_t newSize) {
364
365 }
366
372 void reserve(size_t newCapacity) {
373
374 }
375
381 void erase(iterator position) {
382
383 }
384
391 void insert(iterator position, const T& value) {
392
393 }
394
400 void swap(vector& other) {
401
402 }
403
409 iterator begin() {
410
411 }
412
418 iterator end() {
419
420 }
421
422};
423
424} // namespace std
A simple vector class template.
Definition: std.hpp:290
void erase(iterator position)
Removes the element at the specified position.
Definition: std.hpp:381
void reserve(size_t newCapacity)
Reserves storage for the specified number of elements.
Definition: std.hpp:372
vector()
Default constructor.
Definition: std.hpp:295
void pop_back()
Removes the last element of the vector.
Definition: std.hpp:311
void resize(size_t newSize)
Resizes the vector to contain the specified number of elements.
Definition: std.hpp:363
T & front()
Returns a reference to the first element.
Definition: std.hpp:329
void push_back(const T &value)
Adds an element to the end of the vector.
Definition: std.hpp:304
iterator begin()
Returns an iterator to the first element.
Definition: std.hpp:409
void swap(vector &other)
Swaps the contents of the vector with another vector.
Definition: std.hpp:400
void clear()
Clears the contents of the vector.
Definition: std.hpp:354
iterator end()
Returns an iterator to the last element.
Definition: std.hpp:418
size_t size() const
Returns the number of elements in the vector.
Definition: std.hpp:320
T & back()
Returns a reference to the last element.
Definition: std.hpp:338
void insert(iterator position, const T &value)
Inserts an element at the specified position.
Definition: std.hpp:391
bool empty() const
Checks if the vector is empty.
Definition: std.hpp:347
Provides common mathematical functions and vector operations.
Definition: std.hpp:4
iostream cout
Standard output stream.
Definition: std.hpp:267
int abs(int x)
Computes the absolute value of an integer.
Definition: std.hpp:83
void shuffle(RandomIt first, RandomIt last)
Shuffles the elements in a range.
Definition: std.hpp:227
double cbrt(double x)
Computes the cube root of a number.
Definition: std.hpp:215
double floor(double x)
Computes the floor of a number.
Definition: std.hpp:194
double cosh(double x)
Computes the hyperbolic cosine of a number.
Definition: std.hpp:154
double acos(double x)
Computes the arc cosine of a number.
Definition: std.hpp:113
iostream cerr
Standard error stream.
Definition: std.hpp:281
double sin(double x)
Computes the sine of a number.
Definition: std.hpp:53
double sqrt(double x)
Computes the square root of a number.
Definition: std.hpp:32
double log10(double x)
Computes the base-10 logarithm of a number.
Definition: std.hpp:12
double exp(double x)
Computes the exponential function of a number.
Definition: std.hpp:22
double acosh(double x)
Computes the hyperbolic arc cosine of a number.
Definition: std.hpp:237
iostream endl
End-of-line manipulator.
Definition: std.hpp:274
double fabs(double x)
Computes the absolute value of a floating-point number.
Definition: std.hpp:93
double tanh(double x)
Computes the hyperbolic tangent of a number.
Definition: std.hpp:174
double atan(double x)
Computes the arc tangent of a number.
Definition: std.hpp:133
double asin(double x)
Computes the arc sine of a number.
Definition: std.hpp:123
double log(double x)
Computes the natural logarithm of a number.
Definition: std.hpp:103
double sinh(double x)
Computes the hyperbolic sine of a number.
Definition: std.hpp:164
double tan(double x)
Computes the tangent of a number.
Definition: std.hpp:73
double asinh(double x)
Computes the hyperbolic arc sine of a number.
Definition: std.hpp:247
double atanh(double x)
Computes the hyperbolic arc tangent of a number.
Definition: std.hpp:257
double pow(double base, double exponent)
Computes the power of a number.
Definition: std.hpp:43
double atan2(double y, double x)
Computes the arc tangent of y/x.
Definition: std.hpp:144
double ceil(double x)
Computes the ceiling of a number.
Definition: std.hpp:184
double fmod(double x, double y)
Computes the remainder of the division of two numbers.
Definition: std.hpp:205
double cos(double x)
Computes the cosine of a number.
Definition: std.hpp:63