A custom,multifunctional class template for arrays which supports lambda functions for removing and selecting

Overview

C++ Array Template Class

This is an implementation of a template class for storing data in any type.It includes user-friendly interface with lots of helper abstract functions.

Member Functions

Function Name Parameters Return Type Description
add T element void Adds given element to end of current array
clear void Clears the array
count T element int Returns total count of the element
first T Returns first element in the array
firstIndexOf T element int Returns first index of the element in the array
getCapacity int Returns capacity of the array
getSize int Returns size of the array
insert T element, int index void Inserts given element to a specific index
includes T element bool Returns if the element exists in the array
isEmpty bool Returns if the array is empty
last T Returns last element in the array
lastIndexOf T element int Returns last index of the element in the array
pop T element Returns first element in the array and removes it from the array
push T element void Inserts the element in first index of the array
select bool (T) Array Returns a sub-array with elements in the array which returns true for given lambda function
sort void Sorts the array
sort bool(T,T) void Sorts the array according to the given lambda function
subArray int start,int end Array Returns a sub-array between given indexes
swap int index1, int index2 void Swaps elements in the given indexes
remove T element void Removes all occurances of the element from the array
removeIf bool(T) void Removes all elements from the array which return false from given lambda function
removeIndex int index void Removes the element in the given index
removeRange int start, int end void Removes all elements in the given range of indexes
reverse void Reverses order of the array

Overloaded Operators

Operator Parameters Return Type Description
<< std::ostream stream, Array element std::ostream Inserts elements of the array to stream via stream insertion operator
+ Array array,Array other Array Concats elements of two arrays
- Array array,Array other Array Removes elements of second array from first array
^ Array array,Array other Array Returns an array which includes intersection of two arrays
== Array array,Array other bool Returns if two arrays are equal
!= Array array,Array other bool Returns if two arrays are not equal
[] int index T Returns element in given index
[] {int index1,int index2} Array Returns an sub-array which includes elements between two indexes

Important Note

To use some of listed functions and overloaded operators given T type must support these operations

You might also like...
This is an active mirror of the KiCad development branch, which is hosted at GitLab

This is an active mirror of the KiCad development branch, which is hosted at GitLab (updated every time something is pushed). Pull requests on GitHub are not accepted or watched.

This repo is for competitive coders. In the readme file you will get the list of questions. You can contribute by adding your solutions or by providing the optimized solutions which are answered already.
This repo is for competitive coders. In the readme file you will get the list of questions. You can contribute by adding your solutions or by providing the optimized solutions which are answered already.

Hello, Problem Solvers !!! 💥 What it's about? 👩‍💻 This repository is for Competitive Coders to get started with Open-source. 📃 We have curated a l

A high level programming language which compiles to C.
A high level programming language which compiles to C.

What is Stilts? The goal of this project is to create a language that's nice to work with, looks and feels like Java, but maps to low level C code wit

Variadic recursive expression templates which look like ordinary (possibly nested) containers.

Variadic resursive expressions with lazy evaluation which look like nested containers LazyExpression is a header-only library written in C++17. It imp

Hello, I am creating this file to make everyone understand the basis of C++ language which is actually the advanced version of C but better than C because of its OOPs feature.

Hello-in-C++ 😄 😄 FOR BEGINNERS IN C++ Hello, I am creating this file to make everyone understand the basics of C++ language which is actually the ad

The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++
The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++

The C++ Core Guidelines are a collaborative effort led by Bjarne Stroustrup, much like the C++ language itself. They are the result of many person-years of discussion and design across a number of organizations. Their design encourages general applicability and broad adoption but they can be freely copied and modified to meet your organization's needs.

Welcome to my dungeon. Here, I keep all my configuration files in case I have a stroke and lose all my memory. You're very welcome to explore and use anything in this repository. Have fun!

Fr1nge's Dotfiles Welcome to my dungeon. Here, I keep all my configuration files in case I have a stroke an d lose all my memory. You're very welcome

This repository contains notes and starter code for Bit manipulation and mathematics session for DSA bootcamp organized by Codeflows.

Bitmanipulation_maths This repository contains notes and starter code for Bit manipulation and mathematics session for DSA bootcamp organized by Codef

cpp fundamentals and questions for beginners and intermediates
cpp fundamentals and questions for beginners and intermediates

DSA 60 days Hi people! So we have started grasping dsa concepts and solving problems from 12 July. And we shall continue till September 10 Starting fr

Owner
Ozan Armağan
Computer Science Geek - Student
Ozan Armağan
cs49n class materials: stanford autumn quarter 2021

CS49n (Aut, 21): using bits to control atoms. Overview This is a lab-based class. It is structured where you will write the code to control 1-2 hardwa

null 5 Dec 24, 2021
Implementation using C in programming lab class when being Teacher Assistant.

C Programming Lab Implementation using C in programming lab class when being Teacher Assistant. The problems are here Problems and Description Week2 w

Tsuen Hsueh 1 Aug 16, 2022
uniptr_t - C++ Pointer Utility Class

uniptr_t - C++ Pointer Utility Class uniptr_t stands for univerasl pointer. It's a small C++ class wrapping any pointer type. It removes the need to c

1hAck 3 May 15, 2022
L.A. Noire - V Patch | A community-made patch for the 2011's video game L.A Noire containing a set of fixes like an unlocked framerate or custom aspect ratios.

V-Patch for L.A Noire Complete Edition This project is not affiliated with Take-Two or Rockstar Games A while ago I wanted to replay L.A Noire on my n

null 193 Jan 2, 2023
Jinja2 C++ (and for C++) almost full-conformance template engine implementation

Jinja2С++ C++ implementation of the Jinja2 Python template engine. This library brings support of powerful Jinja2 template features into the C++ world

Jinja2C++ project 385 Dec 17, 2022
This is a simple UNITEST to test the implementation of the the various container types of the C++ standard template library

ft_container UNITest. This is a simple UNITEST to test the implementation of the the various container types of the C++ standard template library that

Mohamed AMOUSSAOUI 46 Dec 27, 2022
Love template metaprogramming

Metal Metal is a single-header C++11 library designed to make you love template metaprogramming. Overview #include <metal.hpp> // First we need some

Bruno Dutra 305 Dec 22, 2022
Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library, and Busybox userland utilities.

Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library, and Busybox userland utilities.

John Davidson 1.3k Jan 8, 2023
C++20 Concepts IO library which is 10x faster than stdio and iostream

fast_io fast_io is a new C++20 library for extremely fast input/output and aims to replace iostream and cstdio. It is header-only (module only in the

null 153 Feb 16, 2022
This is a C/C++ simulation project which illustrates the framing of standard ethernet protocol

This is a C/C++ simulation project which illustrates the framing of standard ethernet protocol. It creates server and client processes on the same machine and through IPC, it sends the data from the client to the server in a simplex communication.

P Punyacharan 7 Oct 14, 2022