call a function

call a function

Please i want to call the function union via main
How I can do it???
Here you find my code

With my best Regards,

//--------------------------------

package model;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;

public class Relation
{
public boolean[][] matrix;
private boolean[][] matrix2;
int rows;
int columns;

public Relation(int rows, int columns)
{
this.rows = rows;
this.columns = columns;

System.out.println("Relation Called");

matrix = new boolean[rows][columns];
matrix2 = new boolean[rows][columns];

}


public Relation union(Relation mat)
{
boolean[][] m, p;
m = mat.getMatrix();
Relation result = new Relation(mat.rows, mat.columns);

p = result.getMatrix();

for (int i = 0; i < rows; i++)
{
for (int j = 0; j < columns; j++)
{
if ((matrix[i][j]) || (m[i][j]))
{
p[i][j] = true;
}
}
}
return result;
}

public Relation inverse()
{
boolean[][] m;
m = new boolean[columns][rows];
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < columns; j++)
{
m[j][i] = matrix[i][j];
}
}
Relation mat = new Relation(columns, rows);
mat.setMatrix(m);
return mat;
}



public static void main(String[] args)
{
Relation relation = new Relation(3, 4);

System.out.print("Give your name: ");

int[][] mat = { {1,0,0,0,0},
{0,1,0,0,0},
{0,0,1,0,0},
{0,0,0,1,0},
{0,0,1,0,1},
};

//calling the function union : paramtere to pass is mat
//how i call it
}
}

View Answers

May 26, 2010 at 5:46 PM

Hi Friend,

Please post your problem in detail.

Thanks









Related Tutorials/Questions & Answers:
call function in php
call function in php  What is the call function in PHP please explain
call to a member function
call to a member function  While uploading the data on server i am getting following error... call to a member function children
Advertisements
UIWebView call javascript function
from UIWebView. Please let's know how to call JavaScript function from objective c... to call javascript function: [webView stringByEvaluatingJavaScriptFromString...UIWebView call javascript function  Hi, I am developing web browser
php function call
php function call  I have an function in error-status.php like this function validateHostName($hostName) { if((strpbrk($hostName,'`~!@#$^&... to cal this function in my other page which is datetime.php how it is posible
function call in javascript - Java Beginners
function call in javascript  hi all, i've written a javascript , but i m unable to call a function getExpression.i dont know why getExpression function is not being called. heres my code : function
call a function - Java Interview Questions
call a function  Please i want to call the function union via main...}, }; //calling the function union : paramtere to pass is mat //how i call it } }   Hi Friend, Please post your problem
error call to undefined function mysql_connect
error call to undefined function mysql_connect  what is error call to undefined function mysql_connect
how to call javascript function from flex
how to call javascript function from flex  how to call javascript function from flex
Flex - Call JavaScript Function And Open a Popup Window that Displays Data
Flex - Call JavaScript Function And Open a Popup Window that Displays Data  Flex - Call JavaScript Function And Open a Popup Window that Displays Data
how to call java script function through java class file
how to call java script function through java class file  how to call jframe in java script
how to call the array variable in scriptlet from javascript function
how to call the array variable in scriptlet from javascript function  This is the scriptlet code:- <% String[] abc={"saab","volvo","bmw","Benz... and display them in the dropdown list by using the below function function myFunction
Fatal error: Call to undefined function session_register() in .php file
Fatal error: Call to undefined function session_register() in .php file  I upgraded the PHP and MySQL and in my application following error is coming: Fatal error: Call to undefined function session_register() in ...php file
How I call the function union from the main - Java Interview Questions
How I call the function union from the main  Please, from public static void main(String[] args) I would like to call the function union and I...}, }; //calling the function union : paramtere to pass is mat //how i call
function
function  difference between function overloading and operator overloading
PHP Function
a function and put the necessary coding into it and we can call this function..., and one function can call itself too, this technique is called recursion. ... manageable, robust. A general format of the function in PHP is as follows:ADS
Invoke JavaScript function from servlet
Invoke JavaScript function from servlet You have learnt several servlet related examples. Here we are going to create an example that will call JavaScript function from the servlet. Embedding JavaScript in Servlets can be useful when
PHP Call By Reference
function. PHP Call By Reference Example:ADS_TO_REPLACE_1 <?php function...PHP Call By Reference: In PHP we can pass reference of a variable, so that we can modify the variable's value inside another function and get the modified
Calling Flex Function From JavaScript
From JavaScript Sometimes, you may need to call flex function from JavaScript... by JavaScript to call the flex function, and the second parameter is the actual.... This reference is used to call the flex function. 2. Add html code
PHP Function
a function and put the necessary coding into it and we can call this function from... function can call itself too, this technique is called recursion.  ADS... function helps us a lot. A function is a set of coding within a block, which has
Calling Anonymous JavaScript Function From Flex
application, you can call javascript function defined in html file where your flex file is embed. But you can also call an anomymous javascript function... = (ExternalInterface.call("function() { alert('Anonumous function call
call a constructor
call a constructor  How do you call a constructor for a parent class
call ireports
call ireports  how to call jrxml file in jsp or servlets pls give one example any one? please send one example any one
Iphone call
Iphone call  Do you have other method to make a call on Iphone,without openUrl
making call
making call  Hi, Is it possible to make a call from application... this the code for call to a number NSString *phoneStr = [[NSString alloc... for call to a number ADS_TO_REPLACE_2 NSString *phoneStr = [[NSString alloc
conference call
conference call  hi am a java beginner I want to develop a simple conference call system over a LAN can u please enlighten me on the basics that I have to do and kno first
conference call
conference call  hi am a java beginner I want to develop a simple conference call system over a LAN can u please enlighten me on the basics that I have to do and kno first
conference call
conference call  hi am a java beginner I want to develop a simple conference call system over a LAN can u please enlighten me on the basics that I have to do and kno first
conference call
conference call  hi am a java beginner I want to develop a simple conference call system over a LAN can u please enlighten me on the basics that I have to do and kno first
conference call
conference call  hi am a java beginner I want to develop a simple conference call system over a LAN can u please enlighten me on the basics that I have to do and kno first
conference call
conference call  hi am a java beginner I want to develop a simple conference call system over a LAN can u please enlighten me on the basics that I have to do and kno first
conference call
conference call  hi am a java beginner I want to develop a simple conference call system over a LAN can u please enlighten me on the basics that I have to do and kno first
Function pointer in c
Function pointer in c  What is the difference between function call with function pointer and without function pointer(normal function call
PHP User Defined Function
PHP User Defined Function An user-defined function saves  us from ... functions as per the need. General structure of the user defined function is:ADS_TO_REPLACE_1 function function_name([mixed $var,.....]){ PHP code} mixed
VoIP Call
VoIP Call VoIP Call quality Network testing and monitoring vendors are betting you will as they peddle new call quality management applications..., and businesses embracing VoIP can't afford to make assumptions about call quality
Call Procedure
Call Procedure      ... illustrate an example from 'Call Procedure'. In this Tutorial we create... ; Call Procedure The call stu(10) return you the records from
isNaN function
isNaN function  What does isNaN function do
function addValue
function addValue  i have question about the javascript the function addvalue script is working to add some name but is not save on the html so please resolve my problem what can i do for addvalue function will be to save
function addValue
function addValue  i have question about the javascript the function addvalue script is working to add some name but is not save on the html so please resolve my problem what can i do for addvalue function will be to save
function addValue
function addValue  i have question about the javascript the function addvalue script is working to add some name but is not save on the html so please resolve my problem what can i do for addvalue function will be to save
If function in PHP
If function in PHP  Hi, Provide me the example of If function in PHP. ThanksADS_TO_REPLACE_1   Hi, If function is PHP is used to check... of if() function in PHP:ADS_TO_REPLACE_2 $book="PHP"; if($book=="PHP"){ echo "Book
Calling a function
Calling a function  Hi, I have a function xyz() in php code. When a button is clicked it should execute that particular function for that i have... function function xyz() { } but this is not working can u tell me
function method
function method  input Rs. 12000 Discount= 10%, 8% = Rs.(12000-1200) = Rs.(10800-864) = Rs. 9936
function method
function method  input Rs. 12000 Discount= 10%, 8% = Rs.(12000-1200) = Rs.(10800-864) = Rs. 9936
using function
using function   using a function to find the value of v from the foiiowing expression 1v=1u+1*f
disable function
disable function  Sir, I have called a java script function when one radio button is checked i want to disable this function when another radio button is checked ,both radio buttons are of same group Please help Thanks in advance
unoin function
unoin function  how to define a union function in java?(ex:a=a U b) how to write tha java code?give ex.   Java Union Function You have learnt union, intersection etc in Sets. Here the given code finds the union of two
function method
function method  i. void display(String str.int p)with one string... is an example where we have created a function that accepts a string and an integer...); } }   Here is an example where we have created a function that accepts
using function
using function  write a program using function overloading to accept any sentence and print vowels and consonants sepratly   Here is an example that accepts a sentence from the user and display the vowels and consonants
How to call servlet in JSP?
How to call servlet in JSP?  How to call servlet in JSP
what is an ajax call?
what is an ajax call?  can u please explain the correct usage of an ajax call in jsps and java script

Ads