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
269double clamp(double x, double min, double max) {
270
271}
272
280double max(double a, double b) {
281
282}
283
291double min(double a, double b) {
292
293}
294
295
301iostream cout;
302
308iostream endl;
309
315iostream cerr;
316
317
323template <class T>
324class vector {
325public:
330 // TODO: Implement constructor
331 }
332
338 void push_back(const T& value) {
339
340 }
341
345 void pop_back() {
346
347 }
348
354 size_t size() const {
355
356 }
357
363 T& front() {
364
365 }
366
372 T& back() {
373
374 }
375
381 bool empty() const {
382
383 }
384
388 void clear() {
389
390 }
391
397 void resize(size_t newSize) {
398
399 }
400
406 void reserve(size_t newCapacity) {
407
408 }
409
415 void erase(iterator position) {
416
417 }
418
425 void insert(iterator position, const T& value) {
426
427 }
428
434 void swap(vector& other) {
435
436 }
437
443 iterator begin() {
444
445 }
446
452 iterator end() {
453
454 }
455
456};
457
458} // namespace std
A simple vector class template.
Definition: std.hpp:324
void erase(iterator position)
Removes the element at the specified position.
Definition: std.hpp:415
void reserve(size_t newCapacity)
Reserves storage for the specified number of elements.
Definition: std.hpp:406
vector()
Default constructor.
Definition: std.hpp:329
void pop_back()
Removes the last element of the vector.
Definition: std.hpp:345
void resize(size_t newSize)
Resizes the vector to contain the specified number of elements.
Definition: std.hpp:397
T & front()
Returns a reference to the first element.
Definition: std.hpp:363
void push_back(const T &value)
Adds an element to the end of the vector.
Definition: std.hpp:338
iterator begin()
Returns an iterator to the first element.
Definition: std.hpp:443
void swap(vector &other)
Swaps the contents of the vector with another vector.
Definition: std.hpp:434
void clear()
Clears the contents of the vector.
Definition: std.hpp:388
iterator end()
Returns an iterator to the last element.
Definition: std.hpp:452
size_t size() const
Returns the number of elements in the vector.
Definition: std.hpp:354
T & back()
Returns a reference to the last element.
Definition: std.hpp:372
void insert(iterator position, const T &value)
Inserts an element at the specified position.
Definition: std.hpp:425
bool empty() const
Checks if the vector is empty.
Definition: std.hpp:381
Provides common mathematical functions and vector operations.
Definition: std.hpp:4
iostream cout
Standard output stream.
Definition: std.hpp:301
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:315
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:308
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 max(double a, double b)
Computes the maximum of two numbers.
Definition: std.hpp:280
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 clamp(double x, double min, double max)
Clamps a value between a minimum and maximum.
Definition: std.hpp:269
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 min(double a, double b)
Computes the minimum of two numbers.
Definition: std.hpp:291
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