1. Trang chủ
  2. » Thể loại khác

Tài liệu PDF Inverse Functions

50 75 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 50
Dung lượng 3,77 MB

Nội dung

Tài liệu PDF Inverse Functions tài liệu, giáo án, bài giảng , luận văn, luận án, đồ án, bài tập lớn về tất cả các lĩnh v...

Single Row Functions 3 Introduction to Oracle: SQL and PL/SQL Using Procedure Builder3Ć2 Single Row Functions 3Ć3 Objectives Functions make the basic query block more powerful and are used to manipulate data values. This is the first of two lessons that explore functions. You will focus on single row character, number, and date functions, as well as those functions that convert data from one type to another, for example, character data to numeric. At the end of this lesson, you should be able to D Explain the various types of functions available in SQL. D Identify the basic concepts of using functions. D Use a variety of character, number, and date functions in SELECT statements. D Explain the conversion functions and how they might be used. Introduction to Oracle: SQL and PL/SQL Using Procedure Builder3Ć4 Single Row Functions 3Ć5 Overview Functions are a very powerful feature of SQL and can be used to D Perform calculations on data. D Modify individual data items. D Manipulate output for groups of rows. D Alter date formats for display. D Convert column datatypes. There are two distinct types of functions: D Single row functions. D Multiple row functions. Single Row Functions These functions operate on single rows only, and return one result per row. There are different types of single row functions. We will cover those listed below. D Character D Number D Date D Conversion Multiple Row Functions These functions manipulate groups of rows to give one result per group of rows. For more information, see Oracle7 Server SQL Reference, Release 7.3 for the complete list of available functions and syntax. Introduction to Oracle: SQL and PL/SQL Using Procedure Builder3Ć6 Single Row Functions 3Ć7 Single Row Functions Single row functions are used to manipulate data items. They accept one or more arguments and return one value for each row returned by the query. An argument may be one of the following: D A user-supplied constant D A variable value D A column name D An expression Features of Single Row Functions D They act on each row returned in the query. D They return one result per row. D They may return a data value of a different type than that referenced. D They may expect one or more user arguments. D You can nest them. D You can use them in SELECT, WHERE, and ORDER BY clauses. Syntax function_name (column|expression, [arg1, arg2, .]) where: function_name is the name of the function. column is any named database column. expression is any character string or calculated expression. arg1, arg2 is any argument to be used by the function. Introduction to Oracle: SQL and PL/SQL Using Procedure Builder3Ć8 Single Row Functions 3Ć9 Character Functions Single row character functions accept character data as input and can return both character and number values. Function Purpose LOWER(column|expression) Converts alpha character values to lowercase. UPPER(column|expression) Converts alpha character values to uppercase. INITCAP(column|expression) Converts alpha character values to uppercase for the first letter of each word, all other letters in lowercase. CONCAT(column1|expression1, column2|expression2) Concatenates the first character value to the second character value. Equivalent to concatenation operator (||). SUBSTR(column|expression,m[,n]) Returns specified characters from character value starting at character position m, n characters long. If m is negative, the count starts from the end of the character value. LENGTH(column|expression) Returns the number of characters in value. NVL(column|expression1,column|ex pression2) Converts the the first value if null to the Inverse Functions Inverse Functions By: OpenStaxCollege A reversible heat pump is a climate-control system that is an air conditioner and a heater in a single device Operated in one direction, it pumps heat out of a house to provide cooling Operating in reverse, it pumps heat into the building from the outside, even in cool weather, to provide heating As a heater, a heat pump is several times more efficient than conventional electrical resistance heating If some physical machines can run in two directions, we might ask whether some of the function “machines” we have been studying can also run backwards [link] provides a visual representation of this question In this section, we will consider the reverse nature of functions Can a function “machine” operate in reverse? Verifying That Two Functions Are Inverse Functions Suppose a fashion designer traveling to Milan for a fashion show wants to know what the temperature will be He is not familiar with the Celsius scale To get an idea of how 1/50 Inverse Functions temperature measurements are related, he asks his assistant, Betty, to convert 75 degrees Fahrenheit to degrees Celsius She finds the formula C = (F − 32) and substitutes 75 for F to calculate (75 − 32) ≈ 24°C Knowing that a comfortable 75 degrees Fahrenheit is about 24 degrees Celsius, he sends his assistant the week’s weather forecast from [link] for Milan, and asks her to convert all of the temperatures to degrees Fahrenheit At first, Betty considers using the formula she has already found to complete the conversions After all, she knows her algebra, and can easily solve the equation for F after substituting a value for C For example, to convert 26 degrees Celsius, she could write 26 = (F − 32) 26 ⋅ = F − 32 F = 26 ⋅ + 32 ≈ 79 After considering this option for a moment, however, she realizes that solving the equation for each of the temperatures will be awfully tedious She realizes that since 2/50 Inverse Functions evaluation is easier than solving, it would be much more convenient to have a different formula, one that takes the Celsius temperature and outputs the Fahrenheit temperature The formula for which Betty is searching corresponds to the idea of an inverse function, which is a function for which the input of the original function becomes the output of the inverse function and the output of the original function becomes the input of the inverse function Given a function f(x), we represent its inverse as f − 1(x), read as “f inverse of x.” The raised −1 is part of the notation It is not an exponent; it does not imply a power of −1 1 In other words, f − 1(x) does not mean f(x) because f(x) is the reciprocal of f and not the inverse The “exponent-like” notation comes from an analogy between function composition and multiplication: just as a − 1a = (1 is the identity element for multiplication) for any nonzero number a, so f − ∘ f equals the identity function, that is, (f − ∘ f)(x) = f − 1(f(x)) = f − 1(y) = x This holds for all x in the domain of f Informally, this means that inverse functions “undo” each other However, just as zero does not have a reciprocal, some functions not have inverses Given a function f(x), we can verify whether some other function g(x) is the inverse of f(x) by checking whether either g(f(x)) = x or f(g(x)) = x is true We can test whichever equation is more convenient to work with because they are logically equivalent (that is, if one is true, then so is the other.) For example, y = 4x and y = x are inverse functions (f − ∘ f)(x) = f − 1(4x) = 14 (4x) = x and (f ∘ f − 1)(x) = f( 14 x) = 4( 14 x) = x A few coordinate pairs from the graph of the function y = 4x are (−2, −8), (0, 0), and (2, 8) A few coordinate pairs from the graph of the function y = x are (−8, −2), (0, 0), and (8, 2) If we interchange the input and output of each coordinate pair of a function, the interchanged coordinate pairs would appear on the graph of the inverse function 3/50 Inverse Functions A General Note Inverse Function For any one-to-one function f(x) = y, a function f − 1(x) is an inverse function of f if f − 1(y) = x This can also be written as f − 1(f(x)) = x for all x in the domain of f It also follows that f(f − 1(x)) = x for all x in the domain of f − if f − is the inverse of f The notation f − is read “f inverse.” Like any other function, we can use any variable name as the input for f − 1, so we will often write f − 1(x), which we read as “f inverse of x.” Keep in mind that f − 1(x) ≠ f(x) and not all functions have inverses Identifying an Inverse Function for a Given Input-Output Pair If for a particular one-to-one function f(2) = and f(5) = 12, what are the corresponding input and output values for the inverse function? The inverse function reverses the input and output quantities, so if f(2) = 4, then f − 1(4) = 2; f(5) = 12, then f − 1(12) = Alternatively, if we want to name the inverse function g, then g(4) = and g(12) = Analysis Notice that if we show the coordinate pairs in a ... 5.10 Polynomial Approximation from Chebyshev Coefficients 197 Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machine- readable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMs visit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America). 5.10 Polynomial Approximation from Chebyshev Coefficients You may well ask after reading the preceding two sections, “Must I store and evaluate my Chebyshev approximation as an array of Chebyshev coefficients for a transformed variable y? Can’t I convert the c k ’s into actual polynomial coefficients in the original variable x and have an approximation of the following form?” f(x) ≈ m−1  k=0 g k x k (5.10.1) Yes, you can do this (and we will give you the algorithm to do it), but we caution you against it: Evaluating equation (5.10.1), where the coefficient g’s reflect an underlying Chebyshev approximation, usually requires more significant figures than evaluation of the Chebyshev sum directly (as by chebev). This is because the Chebyshev polynomials themselves exhibit a rather delicate cancellation: The leading coefficient of T n (x), for example, is 2 n−1 ; other coefficients of T n (x) are even bigger; yet they all manage to combine into a polynomial that lies between ±1. Only when m is no larger than 7 or 8 should you contemplate writing a Chebyshev fit as a direct polynomial, and even in those cases you should be willing to tolerate two or so significant figures less accuracy than the roundoff limit of your machine. You get the g’s in equation (5.10.1) from the c’s output from chebft (suitably truncated atamodest value of m)bycallinginsequencethe followingtwoprocedures: #include "nrutil.h" void chebpc(float c[], float d[], int n) Chebyshev polynomial coefficients. Given a coefficient array c[0 n-1] , this routine generates a coefficient array d[0 n-1] such that  n-1 k=0 d k y k =  n-1 k=0 c k T k (y) − c 0 /2.Themethod is Clenshaw’s recurrence (5.8.11), but now applied algebraically rather than arithmetically. { int k,j; float sv,*dd; dd=vector(0,n-1); for (j=0;j<n;j++) d[j]=dd[j]=0.0; d[0]=c[n-1]; for (j=n-2;j>=1;j--) { for (k=n-j;k>=1;k--) { sv=d[k]; d[k]=2.0*d[k-1]-dd[k]; dd[k]=sv; } sv=d[0]; d[0] = -dd[0]+c[j]; dd[0]=sv; } for (j=n-1;j>=1;j--) d[j]=d[j-1]-dd[j]; d[0] = -dd[0]+0.5*c[0]; free_vector(dd,0,n-1); } 198 Chapter 5. Evaluation of Functions Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machine- readable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMs visit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America). void pcshft(float a, float b, float d[], int n) Polynomial coefficient shift. Given a coefficient array d[0 n-1] , this routine generates a coefficient array g [0 n-1] such that  n-1 k=0 d k y k =  n-1 k=0 g k x k ,wherexand y are related by (5.8.10), i.e., the interval −1 <y<1is mapped to the interval a <x< b . The array g is returned in d . { int k,j; float fac,cnst; cnst=2.0/(b-a); fac=cnst; for (j=1;j<n;j++) { First we rescale by the factor const . Kevin R. Farrell. “Inverse Problems in Array Processing.” 2000 CRC Press LLC. <http://www.engnetbase.com>. InverseProblemsinArray Processing KevinR.Farrell T-Netix/SpeakEZ 30.1Introduction 30.2BackgroundTheory WavePropagation • SpatialSampling • SpatialFrequency 30.3NarrowbandArrays Look-DirectionConstraint • PilotSignalConstraint 30.4BroadbandArrays 30.5InverseFormulationsforArrayProcessing NarrowbandArrays • BroadbandArrays • Row-ActionProjec- tionMethod 30.6SimulationResults NarrowbandResults • BroadbandResults 30.7Summary References 30.1 Introduction Signalreceptionhasnumerousapplicationsincommunications,radar,sonar,andgeoscienceamong others.However,theadverseeffectsofnoiseintheseapplicationslimittheirutility.Hence,thequest fornewandimprovednoiseremovaltechniquesisanongoingresearchtopicofgreatimportancein avastnumberofapplicationsofsignalreception. Whencertaincharacteristicsofnoiseareknown,theireffectscanbecompensated.Forexample, ifthenoiseisknowntohavecertainspectralcharacteristics,thenafiniteimpulseresponse(FIR)or infiniteimpulseresponse(IIR)filtercanbedesignedtosuppressthenoisefrequencies.Similarly,if thestatisticsofthenoiseareknown,thenaWeinerfiltercanbeusedtoalleviateitseffects.Finally,if thenoiseisspatiallyseparatedfromthedesiredsignal,thenmultisensorarrayscanbeusedfornoise suppression.Thislastcaseisdiscussedinthisarticle. Amultisensorarrayconsistsofasetoftransducers,i.e.,antennas,microphones,hydrophones, seismometers,geophones,etc.thatarearrangedinapatternwhichcantakeadvantageofthespatial locationofsignals.Atwo-elementtelevisionantennaprovidesagoodexample.Toimprovesignal receptionand/ormitigatetheeffectsofanoisesource,theantennapatternismanuallyadjustedto steeralowgaincomponentoftheantennapatterntowardsthenoisesource.Multisensorarrays typicallyachievethisadjustmentthroughtheuseofanarrayprocessingalgorithm.Mostapplica- tionsofmultisensorarraysinvolveafixedpatternoftransducers,suchasalineararray.Antenna patternadjustmentsaremadebyapplyingweightstotheoutputsofeachtransducer.Ifthenoise arrivesfromaspecificnon-changingspatiallocation,thentheweightswillbefixed.Otherwise, c  1999byCRCPressLLC if the noise arrives from random, changing locations then the weights must be adaptive. So, in a military communications application where a communications channel is subject to jamming from random spatial locations, an adaptive array processing algorithm would be the appropriate solution. Commercial applications of microphone arrays include teleconferencing [6] and hearing aids [9]. There are several methods for obtaining the weight update equations in array processing. Most of these are derived from statistically based formulations. The resulting optimal weight vector is then generally expressed in terms of the input autocorrelation matrix. An alternative formulation is to express the array processing problem as a linear system of equations to which iterative matrix inversion techniques can be applied. The matrix inverse formulation will be the focus of this article. The following section provides a background overview of wave propagation, spatial sampling, and spatial filtering. Next, narrowband and broadband beamforming arrays are described along with the standard algorithms used for these implementations. The narrowband and broadband algorithms are then reformulated in terms of an inverse problem and an iterative technique for solving this system of equations is provided. Finally, several examples are given along with a summary. 30.2 Background Theory Array processing uses information regarding the spatial locations of signals to aid in interference suppression and signal enhancement. The spatial locations of signals may be determined by the wavefronts that are emanated by the signal sources. Some background theory regarding wave propa- gation and spatial frequency is necessary to fully understand the  2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 3 - Functions Outline 3.1 Introduction 3.2 Program Components in C++ 3.3 Math Library Functions 3.4 Functions 3.5 Function Definitions 3.6 Function Prototypes 3.7 Header Files 3.8 Random Number Generation 3.9 Example: A Game of Chance and Introducing enum 3.10 Storage Classes 3.11 Scope Rules 3.12 Recursion 3.13 Example Using Recursion: The Fibonacci Series 3.14 Recursion vs. Iteration 3.15 Functions with Empty Parameter Lists  2003 Prentice Hall, Inc. All rights reserved. 2 Chapter 3 - Functions Outline 3.16 Inline Functions 3.17 References and Reference Parameters 3.18 Default Arguments 3.19 Unary Scope Resolution Operator 3.20 Function Overloading 3.21 Function Templates  2003 Prentice Hall, Inc. All rights reserved. 3 3.1 Introduction • Divide and conquer – Construct a program from smaller pieces or components – Each piece more manageable than the original program  2003 Prentice Hall, Inc. All rights reserved. 4 3.2 Program Components in C++ • Modules: functions and classes • Programs use new and “prepackaged” modules – New: programmer-defined functions, classes – Prepackaged: from the standard library • Functions invoked by function call – Function name and information (arguments) it needs • Function definitions – Only written once – Hidden from other functions  2003 Prentice Hall, Inc. All rights reserved. 5 3.3 Math Library Functions • Perform common mathematical calculations – Include the header file <cmath> • Functions called by writing – functionName(argument1, argument2, …); •Example cout << sqrt( 900.0 ); – sqrt (square root) function The preceding statement would print 30 – All functions in math library return a double  2003 Prentice Hall, Inc. All rights reserved. 6 3.3 Math Library Functions • Function arguments can be – Constants • sqrt( 4 ); –Variables • sqrt( x ); – Expressions • sqrt( sqrt( x ) ) ; • sqrt( 3 - 6x );  2003 Prentice Hall, Inc. All rights reserved. 7 Method Description Example ceil( x ) rounds x to the sm allest integer not less than x ceil( 9.2 ) is 10.0 ceil( -9.8 ) is -9.0 cos( x ) trigonometric cosine of x (x in radians) cos( 0.0 ) is 1.0 exp( x ) exponential function ex exp( 1.0 ) is 2.71828 exp( 2.0 ) is 7.38906 fabs( x ) absolute value of x fabs( 5.1 ) is 5.1 fabs( 0.0 ) is 0.0 fabs( -8.76 ) is 8.76 floor( x ) rounds x to the largest integer not greater than x floor( 9.2 ) is 9.0 floor( -9.8 ) is -10.0 fmod( x, y ) rem ainder of x/y as a floating- point number fmod( 13.657, 2.333 ) is 1.992 log( x ) natural logarithm of x (base e) log( 2.718282 ) is 1.0 log( 7.389056 ) is 2.0 log10( x ) logarithm of x (base 10) log10( 10.0 ) is 1.0 log10( 100.0 ) is 2.0 pow( x, y ) x raised to pow er y (xy) pow( 2 , 7 ) is 128 pow( 9 , .5 ) is 3 sin( x ) trigonometric sine of x (x in radians) sin( 0.0 ) is 0 sqrt( x ) square root of x sqrt( 900.0 ) is 30.0 sqrt( 9.0 ) is 3.0 tan( x ) trigonometric tangent of x (x in radians) tan( 0.0 ) is 0 Fig . 3.2 M a th lib ra ry func tio ns.  2003 Prentice Hall, Inc. All rights reserved. 8 3.4 Functions • Functions – Modularize a program – Software reusability • Call function multiple times • Local variables – Known only in the function in which they are defined – All variables declared in function definitions are local variables • Parameters – Local variables passed to function when called – Provide outside information  2003 Prentice Hall, Inc. All rights reserved. 9 3.5 Function Definitions • Function prototype – Tells compiler argument type and return type of function – int square( int ); • Function takes an int and returns an int – Explained in more detail later • Calling/invoking a function – square(x); – After finished, passes back result  2003 Prentice Hall, Inc. All rights Outsourcing Management Functions for the Acquisition of Federal Facilities (Free Executive Summary) http://www.nap.edu/catalog/10012.html Free Executive Summary ISBN: 978-0-309-07267-0, 152 pages, 6 x 9, paperback (2000) This executive summary plus thousands more available at www.nap.edu. Outsourcing Management Functions for the Acquisition of Federal Facilities Committee on Outsourcing Design and Construction-Related Management Services for Federal Facilities, Board on Infrastructure and the Constructed Environment, National Research Council This free executive summary is provided by the National Academies as part of our mission to educate the world on issues of science, engineering, and health. If you are interested in reading the full book, please visit us online at http://www.nap.edu/catalog/10012.html . You may browse and search the full, authoritative version for free; you may also purchase a print or electronic version of the book. If you have questions or just want more information about the books published by the National Academies Press, please contact our customer service department toll-free at 888-624-8373. COMMITTEE ON OUTSOURCING DESIGN CONTRUCTION- RELATED MANAGEMENT SERVICES FOR FEDERAL FACILITIESHENRY L. MICHEL, Chair, Parson Brinckerhoff, New York, New YorkJOSEPH A. AHEARN, CH2M Hill, Greenwood Village, ColoradoA. WAYNE COLLINS, Arizona Department of Transportation, PhoenixJOHN D. DONAHUE, Harvard University, Cambridge, MassachusettsLLOYD A. DUSCHA, Consulting Engineer, Reston, VirginiaG. BRIAN ESTES, Consulting Engineer, Williamsburg, VirginiaMARK C. FRIEDLANDER, Schiff, Harden, and Waite, Chicago, IllinoisHENRY J. HATCH, American Society of Civil Engineers, Reston, VirginiaSTEPHEN C. MITCHELL, Lester B. Knight and Associates, Inc., Chicago, IllinoisKARLA SCHIKORE, Consultant, Petaluma, CaliforniaE. SARAH SLAUGHTER, MOCA, Inc., Newton, MassachusettsLUIS M. TORMENTA, The LIRO Group, New York, New YorkRICHARD L. TUCKER, University of Texas at AustinNORBERT W. YOUNG, JR., McGraw-Hill Companies, New York, New YorkStaffRICHARD G. LITTLE, Director, Board on Infrastructure and the Constructed EnvironmentLYNDA L. STANLEY, Study DirectorJOHN A. WALEWSKI, Project OfficerLORI J. VASQUEZ, Administrative AssociateNICOLE E. LONGSHORE, Project Assistant Copyright © National Academy of Sciences. All rights reserved. Unless otherwise indicated, all materials in this PDF file are copyrighted by the National Academy of Sciences. Distribution or copying is strictly prohibited without permission of the National Academies Press http://www.nap.edu/permissions/ Permission is granted for this material to be posted on a secure password-protected Web site. The content may not be posted on a public Web site.  Copyright © National Academy of Sciences. All rights reserved. This executive summary plus thousands more available at http://www.nap.edu Outsourcing Management Functions for the Acquisition of Federal Facilities http://books.nap.edu/catalog/10012.html 1 Executive Summary In this study outsourcing is defined as the organizational practice of con- tracting for services from an external entity while retaining control over assets and oversight of the services being outsourced. In the 1980s, a number of factors led to a renewed interest in outsourcing. For private sector organizations, outsourcing was identified as a strategic component of business process reengineering—an effort to ... has only one unique inverse A General Note Domain and Range of Inverse Functions The range of a function f(x) is the domain of the inverse function f − 1(x) 7/50 Inverse Functions The domain... constant, is also equal to its own inverse Media Access these online resources for additional instruction and practice with inverse functions • Inverse Functions • Inverse Function Values Using Graph... appear on the graph of the inverse function 3/50 Inverse Functions A General Note Inverse Function For any one-to-one function f(x) = y, a function f − 1(x) is an inverse function of f if f −

Ngày đăng: 31/10/2017, 16:50

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN