GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MATH::SYMBOLIC::CUSTOM::CONTAINS (3)

.ds Aq ’

NAME

Math::Symbolic::Custom::Contains - Find subtrees in Math::Symbolic expressions

CONTENTS

SYNOPSIS



  use Math::Symbolic qw/:all/;
  use Math::Symbolic::Custom::Contains;
 
  my $formula = parse_from_string(a*b+c);

  print found product if $formula->contains_operator(B_PRODUCT);
  # works
  print found division if $formula->contains_operator(B_DIVISION);



DESCRIPTION

This module extends the functionality of Math::Symbolic by offering facilities to test a Math::Symbolic tree for existance of a specific subtree in the Math::Symbolic tree.

As of version 0.10, this has only been implemented for operators via the contains_operator method.

The module adds methods to all Math::Symbolic objects.

CW$ms_tree->contains_operator( [Operator type] )

This method does not modify the Math::Symbolic tree itself, but instead tests the tree for existance of an operator of the specified operator type. It returns undef if no such operator exists in the tree and returns a reference to the first occurrance of the operator if there are such operators.

Operator types are constants exported by Math::Symbolic. Please refer to the Math::Symbolic manual for details.

If the operator type is omitted, the match will be performed for <B>anyB> operator. That means if the tree contains any operators at all, a reference to the top-most operator will be returned. (Which will always be the top-most node of the tree anyway.)

AUTHOR

Please send feedback, bug reports, and support requests to one of the contributors or the Math::Symbolic mailing list.

List of contributors:



  Steffen MXller, symbolic-module at steffen-mueller dot net



SEE ALSO

New versions of this module can be found on http://steffen-mueller.net or CPAN.

Math::Symbolic

Math::Symbolic::Custom, Math::Symbolic::Custom::Base, Math::Symbolic::Custom::DefaultTests

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MATH::SYMBOLIC::CUSTOM::CONTAINS (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.