2017 © Pedro Peláez
 

library arrayintersections

Tries to find intersections between a combination of arrays.

image

jelle-s/arrayintersections

Tries to find intersections between a combination of arrays.

  • Friday, November 3, 2017
  • by Jelle-S
  • Repository
  • 2 Watchers
  • 1 Stars
  • 115 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

ArrayIntersections

Tries to find intersections between a combination of arrays., (*1)

use Jelle_S\Util\Intersections\ArrayIntersections;

// Get all possible intersections, where the minimum array size of an
// intersection is 3.
$arrays = array(
 array(
   'a' => 1,
   'b' => 2,
   'c' => 3,
   'd' => 4,
   'e' => 9,
 ),
 array(
   'a' => 1,
   'b' => 2,
   'c' => 3,
   'e' => 9,
 ),
 array(
   'a' => 1,
   'b' => 42,
   'c' => 3,
   'd' => 4,

 ),
 array(
   'b' => 42,
   'c' => 3,
   'a' => 1,
 ),
 array(
   'z' => 26,
   'e' => 9,
   'a' => 1,
 ),
);
$intersections = new Jelle_S\Util\Intersections\ArrayIntersections($arrays, 3);
print_r($intersections->getAll());

print_r($intersections->getLargest());

Output:, (*2)

Array
(
    [2] => Array
        (
            [a] => 1
            [b] => 2
            [c] => 3
            [e] => 9
        )

    [1] => Array
        (
            [a] => 1
            [c] => 3
            [d] => 4
        )

    [0] => Array
        (
            [a] => 1
            [b] => 42
            [c] => 3
        )

)
Array
(
    [a] => 1
    [b] => 2
    [c] => 3
    [e] => 9
)

The Versions

03/11 2017

dev-analysis-XWgLjJ

dev-analysis-XWgLjJ

Tries to find intersections between a combination of arrays.

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jelle Sebreghts

11/01 2017

dev-develop

dev-develop

Tries to find intersections between a combination of arrays.

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Jelle Sebreghts

26/12 2016

dev-master

9999999-dev

Tries to find intersections between a combination of arrays.

  Sources   Download

GPL-3.0+

The Requires

 

by Jelle Sebreghts

13/12 2016

1.0.0

1.0.0.0

Tries to find intersections between a combination of arrays.

  Sources   Download

GPL-3.0+

The Requires

 

by Jelle Sebreghts