data_structures
[ class tree: data_structures ] [ index: data_structures ] [ all elements ]

Class: Vector

Source Location: /data_structures/Vector.class.php

Class Overview

ABSTObject
   |
   --Arrays
      |
      --Vector



Author(s):

Version:

  • 0.1.53

Copyright:

  • Copyright (C) 2004 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Variables

Methods


Inherited Methods

Class: Arrays

Arrays::assoc2index()
Returns the given array as an index based array.
Arrays::complementArrays()
Merges two arrays to one. All records that occuring in both arrays will be remove.
Arrays::contains()
Returns true if $array contains $record else it will return false.
Arrays::deleteRecord()
Removes the record at $int-index.
Arrays::deleteRecordValue()
Searches the first record of $value. If it is found it will be removed else the unchanged array will be given back.
Arrays::flatten()
Converts a multidimensional array in a one dimensional array.
Arrays::getFirstIndexOf()
Returns the position of the first record that matches the value of $mixedVal. If there is not a record that matches the value then the function will return false.
Arrays::getFirstIntegerValue()
Returns the first occuring value that is a type of integer.
Arrays::getFirstPregMatchValue()
Returns the first occuring value that matches a regular expression.
Arrays::getIndexAsArray()
Returns the given second dimension index of a two dimensional array as
Arrays::getRandomRecord()
Returns a random record of given $array. Sets automatically a new random set by microtime for real random.
Arrays::getValuesOfKey()
Returns the values behind all keys that correspond with the given one.
Arrays::implodeIndex()
Returns a string containing a string representation of all the array elements on index of the arrays second dimension in the same order, with the glue string between each element.
Arrays::integratedAscending()
Returns whether the records in the array are consecutively numbered in a given range after the array had been sort. This function can be helpful to proof the completeness of data.
Arrays::is_empty()
Returns whether an array is empty. That means every record of the array will be proofed with the function empty().
Arrays::primaryValueToTuple()
Returns a new array with the values from the given key of the second dimension as keys in first dimension refering to the second dimension tuple.
Arrays::sortSecondDimension()
Sorts an array by a given second index. You can affect the order of
Arrays::uniqueInsert()
Fills $record in $array only if $array does not already contains it.
Arrays::uniqueRecords()
Removes doubly occuring records in $array and set up new indexes, so that the first index of the array beginns at zero and the other indexes following integrated and ascendending.

Class: ABSTObject

ABSTObject::printComplexData()
Prints out the more complex data by the given array.
ABSTObject::printPrimitiveData()
Prints out the primitive data by the given arrays.
ABSTObject::printStructure()
Prints out the Structure of this Object.
ABSTObject::same()
Checks whether the passed object reference points to this object.
ABSTObject::sameReferences()
Compares two references whether they points to the same object

Class Details

[line 46]


Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.1.53
copyright:  

Copyright (C) 2004 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

license:  GNU Lesser General Public License


[ Top ]


Class Variables

$mixed =

[line 52]



Tags:

access:  private

Type:   array


[ Top ]



Class Methods


constructor Vector [line 66]

void Vector( [ $arr = array()], array $array*)

Constructor



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

array   $array*   The array to manage.
   $arr  

[ Top ]

method add [line 85]

void add( &$item)

Push one element onto the end of the intern array.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.53
access:  public


Parameters:

   &$item  

[ Top ]

method contains [line 263]

boolean contains( &$record, mixed $record)

Returns true if $this->mixed (the internal array that is managed by the class Vector) contains $record else it will return false.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.1
access:  public


Overrides Arrays::contains() (Returns true if $array contains $record else it will return false.)

Parameters:

mixed   $record   The value which should be compared with the records of the array.
   &$record  

[ Top ]

method deleteRecordAt [line 186]

void deleteRecordAt( &$int, integer $int)

Removes the record at $int-index. All entrys behind the deleted record moving up by one position.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.1
access:  public


Parameters:

integer   $int   Index of record to remove.
   &$int  

[ Top ]

method deleteRecordValue [line 202]

void deleteRecordValue( &$value, mixed $value)

Searches the first record of $value. If it is found it will be delete. All entrys behind the deleted record moving up by one position.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.1
access:  public


Overrides Arrays::deleteRecordValue() (Searches the first record of $value. If it is found it will be removed else the unchanged array will be given back.)

Parameters:

mixed   $value   The value that should be searched.
   &$value  

[ Top ]

method getCurrent [line 216]

mixed getCurrent( )

Returns the value of the current pointer position.



Tags:

author:  Daniel Pl&uuml;cken <daniel@debakel.net>
version:  1.0
since:  0.1.5
access:  public


[ Top ]

method getFirstIndexOf [line 232]

integer|false getFirstIndexOf( &$mixedVal, mixed $mixedVal)

Returns the position of the first record that matches the value of $mixedVal.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.1
access:  public


Overrides Arrays::getFirstIndexOf() (Returns the position of the first record that matches the value of $mixedVal. If there is not a record that matches the value then the function will return false.)

Parameters:

mixed   $mixedVal   The value that should be searched.
   &$mixedVal  

[ Top ]

method getRandomRecord [line 246]

array getRandomRecord( )

Returns a random record of this vector.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.1
access:  public


Overrides Arrays::getRandomRecord() (Returns a random record of given $array. Sets automatically a new random set by microtime for real random.)

[ Top ]

method next [line 139]

void next( integer $int)

Returns the previous entry of this one who is associated with the pointer and arises the pointer by one.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


Parameters:

integer   $int   Index of record to remove.

[ Top ]

method prev [line 170]

mixed prev( )

Returns the previous entry of this one who is associated with the pointer and abates the pointer by one.

This method is an alias of the method previous.




Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


[ Top ]

method previous [line 154]

mixed previous( )

Returns the previous entry of this one who is associated with the pointer and abates the pointer by one.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


[ Top ]

method resetPointer [line 99]

void resetPointer( )

Sets the pointer to the value zero.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


[ Top ]

method select [line 114]

boolean select( integer $int)

Sets the pointer to the given value.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.4
access:  public


Parameters:

integer   $int  

[ Top ]

method uniqueInsert [line 279]

void uniqueInsert( &$record, mixed $record)

Fills $record in $this->mixed only if $this->mixed does not already contains it.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.1
access:  public


Overrides Arrays::uniqueInsert() (Fills $record in $array only if $array does not already contains it.)

Parameters:

mixed   $record   The value which should be filled in the array.
   &$record  

[ Top ]

method uniqueRecords [line 293]

void uniqueRecords( )

Removes doubly occuring records in $this->mixed.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Overrides Arrays::uniqueRecords() (Removes doubly occuring records in $array and set up new indexes, so that the first index of the array beginns at zero and the other indexes following integrated and ascendending.)

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:15:37 +0200 by phpDocumentor 1.4.1