New Member FAQ
|
Forums
|
Earn Revenue
Resources
Entrance
Ask Experts
Exam Papers
Jobs
English
Projects
Universities
Colleges
Courses
Schools
Training
My India
Members
|
Communities
|
Business Directory
|
Classifieds
|
Reviews
|
Silverlight Games
|
Peer Appraisal
|
Bookmarks
|
Polls
|
Mentors
|
Links
|
B.Tech Projects
|
Lobby
|
Gift Shop
|
Chat
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
N K Ravishanka...
(50)
sridevi
(41)
Silamba Kumar ...
(40)
Last 7 Days
Mr. Anindya
(2274)
PROSENJIT MANN...
(2013)
Pawan Bahuguna
(1251)
more...
Awards & Gifts
Online Exams
Aptitude Questions
General Aptitude Tests
Medical Entrance
Engineering Entrance
Bank Tests
TOEFL & IELTS Questions
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
Composition g * f of one variable functions in C Sharp
Posted Date: Total Responses:
0
Posted By:
Mahesh
Member Level:
Platinum
Points/Cash
: 5
using System;
using System.Collections.Generic;
using System.Text;
namespace FormulaEditor
{
///
/// Composition g * f of one variable functions
///
public class OneVariableFuntionCompostion : IOneVariableFunction
{
#region Fields
///
/// The f
///
IOneVariableFunction f;
///
/// The g
///
IOneVariableFunction g;
///
/// The operation of f
///
IObjectOperation fo;
///
/// The operation of g
///
IObjectOperation go;
///
/// Auxiliary variable
///
object[] o = new object[1];
#endregion
#region Ctor
///
/// Constructor
///
///
The f
///
The g
private OneVariableFuntionCompostion(IOneVariableFunction f, IOneVariableFunction g)
{
if (!f.ReturnType.Equals(g.VariableType))
{
throw new Exception();
}
this.f = f;
this.g = g;
fo = f;
go = g;
}
#endregion
#region IOneVariableFunction Members
object IOneVariableFunction.VariableType
{
get { return f.VariableType; }
}
#endregion
#region IObjectOperation Members
int IObjectOperation.Arity
{
get { return 1; }
}
object IObjectOperation.this[object[] x]
{
get
{
o[0] = fo[x];
return go[o];
}
}
object IObjectOperation.ReturnType
{
get { return g.ReturnType; }
}
bool IObjectOperation.IsPowered
{
get { return false; }
}
#endregion
///
/// Composition g * f;
///
///
The f
///
The g
///
The composition
static public IOneVariableFunction Compose(IOneVariableFunction f, IOneVariableFunction g)
{
return new OneVariableFuntionCompostion(f, g);
}
}
}
Project Feedbacks
No feedbacks found. Be the first to respond and make money from
revenue sharing program
.
Post Feedback
You must
Sign In
to post a feedback.
Next Project:
Conditional oprearation detector in C Sharp
Previous Project:
Symbol linked with object in C Sharp Language
Return to Project Index
Post New Project
Related Projects
C++ program - Accessing a function with calling as an expression
Elementary Real Detector
Performer of derivations
How to Convert a Number in to Text in Excel
RMI-CHAT program
Advertise Here
Contact Us
Advertise
Editors
Privacy Policy
Terms Of Use
ISC Technologies.
2006 - 2009 All Rights Reserved.