void insert(struct Array* SparseArray ) { struct edge *temp , *temp_inv; temp = (struct edge*) malloc(sizeof(struct edge)); temp_inv = (p)malloc(sizeof(struct edge));//auxiliary edge for inverting i and j do{ printf("Give i number from 1 to %d \n",size); //zita seira scanf("%d",&temp->i); getchar(); temp_inv->j = temp->i; }while(temp->i >size); do{ printf("Give column number from 1 to %d",size); //zita stili scanf("%d",&temp->j); getchar(); temp_inv ->i = temp->j; }while(temp->j >size); if (!findNode(temp,SparseArray)) { printf("Give me key "); //zita weight scanf("%d",&temp -> weight); getchar(); temp_inv->weight = temp->weight; //Function calling for setting all the ptrs of the edge insertRow(temp ,SparseArray); insertCol(temp,SparseArray); if(temp->i != temp ->j){//prevent double copies of same i and column //Functions for setting the ptr to the inverted i -j insertRow(temp_inv,SparseArray); insertCol(temp_inv,SparseArray); } } }
setColValuesDialog::setColValuesDialog( ScriptingEnv *env, QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { scriptEnv = env; if ( !name ) setName( "setColValuesDialog" ); setCaption( tr( "QtiPlot - Set column values" ) ); setFocusPolicy( QDialog::StrongFocus ); QHBox *hbox1=new QHBox (this, "hbox1"); hbox1->setSpacing (5); QVBox *box1=new QVBox (hbox1, "box2"); box1->setSpacing (5); explain = new QTextEdit(box1, "explain" ); explain->setReadOnly (true); explain->setPaletteBackgroundColor(QColor(197, 197, 197)); colNameLabel = new QLabel(box1, "colNameLabel" ); QVBox *box2=new QVBox (hbox1, "box2"); box2->setMargin(5); box2->setFrameStyle (QFrame::Box); QHBox *hbox2=new QHBox (box2, "hbox2"); hbox2->setMargin(5); hbox2->setSpacing (5); QLabel *TextLabel1 = new QLabel(hbox2, "TextLabel1" ); TextLabel1->setText( tr( "For row (i)" ) ); start = new QSpinBox(hbox2, "start" ); QLabel *TextLabel2 = new QLabel(hbox2, "TextLabel2" ); TextLabel2->setText( tr( "to" ) ); end = new QSpinBox(hbox2, "end" ); start->setMinValue(1); end->setMinValue(1); if (sizeof(int)==2) { // 16 bit signed integer start->setMaxValue(0x7fff); end->setMaxValue(0x7fff); } else { // 32 bit signed integer start->setMaxValue(0x7fffffff); end->setMaxValue(0x7fffffff); } QButtonGroup *GroupBox0 = new QButtonGroup(2,QGroupBox::Horizontal,tr( "" ),box2, "GroupBox0" ); GroupBox0->setLineWidth(0); GroupBox0->setFlat(true); functions = new QComboBox( FALSE, GroupBox0, "functions" ); PushButton3 = new QPushButton(GroupBox0, "PushButton3" ); PushButton3->setText( tr( "Add function" ) ); boxColumn = new QComboBox( FALSE, GroupBox0, "boxColumn" ); PushButton4 = new QPushButton(GroupBox0, "PushButton4" ); PushButton4->setText( tr( "Add column" ) ); QHBox *hbox6=new QHBox (GroupBox0, "hbox6"); hbox6->setSpacing (5); buttonPrev = new QPushButton( hbox6, "buttonPrev" ); buttonPrev->setText("&<<"); buttonNext = new QPushButton( hbox6, "buttonNext" ); buttonNext->setText("&>>"); addCellButton = new QPushButton(GroupBox0, "addCellButton" ); addCellButton->setText( tr( "Add cell" ) ); QHBox *hbox3=new QHBox (this, "hbox3"); hbox3->setSpacing (5); commandes = new ScriptEdit( env, hbox3, "commandes" ); commandes->setGeometry( QRect(10, 100, 260, 70) ); commandes->setFocus(); QVBox *box3=new QVBox (hbox3,"box3"); box3->setSpacing (5); btnOk = new QPushButton(box3, "btnOk" ); btnOk->setText( tr( "OK" ) ); btnApply = new QPushButton(box3, "btnApply" ); btnApply->setText( tr( "Apply" ) ); btnCancel = new QPushButton( box3, "btnCancel" ); btnCancel->setText( tr( "Cancel" ) ); QVBoxLayout* layout = new QVBoxLayout(this,5,5, "hlayout3"); layout->addWidget(hbox1); layout->addWidget(hbox3); setFunctions(); insertExplain(0); connect(PushButton3, SIGNAL(clicked()),this, SLOT(insertFunction())); connect(PushButton4, SIGNAL(clicked()),this, SLOT(insertCol())); connect(addCellButton, SIGNAL(clicked()),this, SLOT(insertCell())); connect(btnOk, SIGNAL(clicked()),this, SLOT(accept())); connect(btnApply, SIGNAL(clicked()),this, SLOT(apply())); connect(btnCancel, SIGNAL(clicked()),this, SLOT(close())); connect(functions, SIGNAL(activated(int)),this, SLOT(insertExplain(int))); connect(buttonPrev, SIGNAL(clicked()), this, SLOT(prevColumn())); connect(buttonNext, SIGNAL(clicked()), this, SLOT(nextColumn())); }
SetColValuesDialog::SetColValuesDialog( ScriptingEnv *env, QWidget* parent, Qt::WFlags fl ) : QDialog( parent, fl ), scripted(env) { setName( "SetColValuesDialog" ); setWindowTitle( tr( "QtiPlot - Set column values" ) ); setSizeGripEnabled(true); QHBoxLayout *hbox1 = new QHBoxLayout(); hbox1->addWidget(new QLabel(tr("For row (i)"))); start = new QSpinBox(); start->setMinValue(1); hbox1->addWidget(start); hbox1->addWidget(new QLabel(tr("to"))); end = new QSpinBox(); end->setMinValue(1); hbox1->addWidget(end); if (sizeof(int)==2) { // 16 bit signed integer start->setMaxValue(0x7fff); end->setMaxValue(0x7fff); } else { // 32 bit signed integer start->setMaxValue(0x7fffffff); end->setMaxValue(0x7fffffff); } QGridLayout *gl1 = new QGridLayout(); functions = new QComboBox(false); gl1->addWidget(functions, 0, 0); btnAddFunction = new QPushButton(tr( "Add function" )); gl1->addWidget(btnAddFunction, 0, 1); boxColumn = new QComboBox(false); gl1->addWidget(boxColumn, 1, 0); btnAddCol = new QPushButton(tr( "Add column" )); gl1->addWidget(btnAddCol, 1, 1); QHBoxLayout *hbox3 = new QHBoxLayout(); hbox3->addStretch(); buttonPrev = new QPushButton("&<<"); hbox3->addWidget(buttonPrev); buttonNext = new QPushButton("&>>"); hbox3->addWidget(buttonNext); gl1->addLayout(hbox3, 2, 0); addCellButton = new QPushButton(tr( "Add cell" )); gl1->addWidget(addCellButton, 2, 1); QGroupBox *gb = new QGroupBox(); QVBoxLayout *vbox1 = new QVBoxLayout(); vbox1->addLayout(hbox1); vbox1->addLayout(gl1); gb->setLayout(vbox1); gb->setSizePolicy(QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred)); explain = new QTextEdit(); explain->setReadOnly (true); explain->setSizePolicy(QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred)); QPalette palette = explain->palette(); palette.setColor(QPalette::Active, QPalette::Base, Qt::lightGray); explain->setPalette(palette); QHBoxLayout *hbox2 = new QHBoxLayout(); hbox2->addWidget(explain); hbox2->addWidget(gb); commands = new ScriptEdit( scriptEnv); QVBoxLayout *vbox2 = new QVBoxLayout(); btnApply = new QPushButton(tr( "&Apply" )); vbox2->addWidget(btnApply); btnCancel = new QPushButton(tr( "&Close" )); vbox2->addWidget(btnCancel); vbox2->addStretch(); QHBoxLayout *hbox4 = new QHBoxLayout(); hbox4->addWidget(commands); hbox4->addLayout(vbox2); QVBoxLayout* vbox3 = new QVBoxLayout(); vbox3->addLayout(hbox2); #ifdef SCRIPTING_PYTHON boxMuParser = NULL; if (env->name() != QString("muParser")){ boxMuParser = new QCheckBox(tr("Use built-in muParser (much faster)")); boxMuParser->setChecked(true); vbox3->addWidget(boxMuParser); } #endif colNameLabel = new QLabel(); vbox3->addWidget(colNameLabel); vbox3->addLayout(hbox4); setLayout(vbox3); setFocusProxy (commands); commands->setFocus(); functions->insertStringList(scriptEnv->mathFunctions(), -1); if (functions->count() > 0) insertExplain(0); connect(btnAddFunction, SIGNAL(clicked()),this, SLOT(insertFunction())); connect(btnAddCol, SIGNAL(clicked()),this, SLOT(insertCol())); connect(addCellButton, SIGNAL(clicked()),this, SLOT(insertCell())); connect(btnApply, SIGNAL(clicked()),this, SLOT(apply())); connect(btnCancel, SIGNAL(clicked()),this, SLOT(close())); connect(functions, SIGNAL(activated(int)),this, SLOT(insertExplain(int))); connect(buttonPrev, SIGNAL(clicked()), this, SLOT(prevColumn())); connect(buttonNext, SIGNAL(clicked()), this, SLOT(nextColumn())); }
SetColValuesDialog::SetColValuesDialog(ScriptingEnv *env, Table *t, Qt::WFlags fl) : QDialog(t, fl), Scripted(env) { setObjectName("SetColValuesDialog"); setWindowTitle(tr("MantidPlot - Set column values")); setSizeGripEnabled(true); QHBoxLayout *hbox1 = new QHBoxLayout(); hbox1->addWidget(new QLabel(tr("For row (i)"))); start = new QSpinBox(); start->setMinimum(1); hbox1->addWidget(start); hbox1->addWidget(new QLabel(tr("to"))); end = new QSpinBox(); end->setMinimum(1); hbox1->addWidget(end); // Ideally this would be checked at compile time. Until we have 'constexpr if` // on all platforms, the added complexity and minimal cost isn't worthwhile. if (sizeof(int) == 2) { // 16 bit signed integer start->setMaximum(0x7fff); end->setMaximum(0x7fff); } else { // 32 bit signed integer start->setMaximum(0x7fffffff); end->setMaximum(0x7fffffff); } QGridLayout *gl1 = new QGridLayout(); boxColumn = new QComboBox(); gl1->addWidget(boxColumn, 1, 0); btnAddCol = new QPushButton(tr("Add column")); gl1->addWidget(btnAddCol, 1, 1); QHBoxLayout *hbox3 = new QHBoxLayout(); hbox3->addStretch(); buttonPrev = new QPushButton("&<<"); hbox3->addWidget(buttonPrev); buttonNext = new QPushButton("&>>"); hbox3->addWidget(buttonNext); gl1->addLayout(hbox3, 2, 0); addCellButton = new QPushButton(tr("Add cell")); gl1->addWidget(addCellButton, 2, 1); QGroupBox *gb = new QGroupBox(); QVBoxLayout *vbox1 = new QVBoxLayout(); vbox1->addLayout(hbox1); vbox1->addLayout(gl1); gb->setLayout(vbox1); gb->setSizePolicy( QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)); explain = new QTextEdit(); explain->setReadOnly(true); explain->setSizePolicy( QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)); QPalette palette = explain->palette(); palette.setColor(QPalette::Active, QPalette::Base, Qt::lightGray); explain->setPalette(palette); QHBoxLayout *hbox2 = new QHBoxLayout(); hbox2->addWidget(explain); hbox2->addWidget(gb); commands = new ScriptEditor(this, scriptingEnv()->createCodeLexer()); QVBoxLayout *vbox2 = new QVBoxLayout(); btnApply = new QPushButton(tr("&Apply")); vbox2->addWidget(btnApply); btnCancel = new QPushButton(tr("&Close")); vbox2->addWidget(btnCancel); vbox2->addStretch(); QHBoxLayout *hbox4 = new QHBoxLayout(); hbox4->addWidget(commands); hbox4->addLayout(vbox2); QVBoxLayout *vbox3 = new QVBoxLayout(); vbox3->addLayout(hbox2); colNameLabel = new QLabel(); vbox3->addWidget(colNameLabel); vbox3->addLayout(hbox4); setLayout(vbox3); setFocusProxy(commands); commands->setFocus(); connect(btnAddCol, SIGNAL(clicked()), this, SLOT(insertCol())); connect(addCellButton, SIGNAL(clicked()), this, SLOT(insertCell())); connect(btnApply, SIGNAL(clicked()), this, SLOT(apply())); connect(btnCancel, SIGNAL(clicked()), this, SLOT(close())); connect(buttonPrev, SIGNAL(clicked()), this, SLOT(prevColumn())); connect(buttonNext, SIGNAL(clicked()), this, SLOT(nextColumn())); setTable(t); }
void menuSparse(struct Array* SparseArray ) { printf("***********************************************\n"); printf("EDIT SPARSE ARRAY WITH DOUBLE LINKED LISTS\n"); printf("************************************************\n"); fflush(stdin); //Array of Structs creation char c = 0; //printf("%d\n",SparseArray->HeaderCols[29]->j); while (c != 'q') { printf("Press i(insert),p(print),d(delete), a(autoInsert) , q(quit editing):\n"); scanf("%c", &c); getchar(); switch (c) { case 'i': insert(SparseArray); break; case 'p': print(SparseArray); break; case 'd': delete(SparseArray); break; case 'q': printf("\n ta lemene\n"); break; case 'a' : //insertion of AUTOGRAPH Reisi { struct edge *temp3; temp3 =(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv3=(struct edge*)malloc(sizeof(struct edge)); temp3->i=25; temp3->j=17; temp3->weight=1; temp_inv3->i=temp3->j; temp_inv3->j=temp3->i; temp_inv3->weight=temp3->weight; insertCol(temp3,SparseArray); insertRow(temp3,SparseArray); insertCol(temp_inv3,SparseArray); insertRow(temp_inv3,SparseArray); struct edge *temp4=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv4=(struct edge*)malloc(sizeof(struct edge)); temp4->i=13; temp4->j=25; temp4->weight=1; temp_inv4->i=temp4->j; temp_inv4->j=temp4->i; temp_inv4->weight=temp4->weight; insertCol(temp4,SparseArray); insertRow(temp4,SparseArray); insertCol(temp_inv4,SparseArray); insertRow(temp_inv4,SparseArray); struct edge *temp5=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv5=(struct edge*)malloc(sizeof(struct edge)); temp5->i=13; temp5->j=20; temp5->weight=1; temp_inv5->i=temp5->j; temp_inv5->j=temp5->i; temp_inv5->weight=temp5->weight; insertCol(temp5,SparseArray); insertRow(temp5,SparseArray); insertCol(temp_inv5,SparseArray); insertRow(temp_inv5,SparseArray); struct edge *temp6=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv6=(struct edge*)malloc(sizeof(struct edge)); temp6->i=20; temp6->j=17; temp6->weight=1; temp_inv6->i=temp6->j; temp_inv6->j=temp6->i; temp_inv6->weight=temp6->weight; insertCol(temp6,SparseArray); insertRow(temp6,SparseArray); insertCol(temp_inv6,SparseArray); insertRow(temp_inv6,SparseArray); struct edge *temp7=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv7=(struct edge*)malloc(sizeof(struct edge)); temp7->i=20; temp7->j=21; temp7->weight=1; temp_inv7->i=temp7->j; temp_inv7->j=temp7->i; temp_inv7->weight=temp7->weight; insertCol(temp7,SparseArray); insertRow(temp7,SparseArray); insertCol(temp_inv7,SparseArray); insertRow(temp_inv7,SparseArray); struct edge *temp8=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv8=(struct edge*)malloc(sizeof(struct edge)); temp8->i=21; temp8->j=17; temp8->weight=1; temp_inv8->i=temp8->j; temp_inv8->j=temp8->i; temp_inv8->weight=temp8->weight; insertCol(temp8,SparseArray); insertRow(temp8,SparseArray); insertCol(temp_inv8,SparseArray); insertRow(temp_inv8,SparseArray); struct edge *temp9=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv9=(struct edge*)malloc(sizeof(struct edge)); temp9->i=25; temp9->j=21; temp9->weight=1; temp_inv9->i=temp9->j; temp_inv9->j=temp9->i; temp_inv9->weight=temp9->weight; insertCol(temp9,SparseArray); insertRow(temp9,SparseArray); insertCol(temp_inv9,SparseArray); insertRow(temp_inv9,SparseArray); struct edge *temp11=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv11=(struct edge*)malloc(sizeof(struct edge)); temp11->i=13; temp11->j=30; temp11->weight=1; temp_inv11->i=temp11->j; temp_inv11->j=temp11->i; temp_inv11->weight=temp11->weight; insertCol(temp11,SparseArray); insertRow(temp11,SparseArray); insertCol(temp_inv11,SparseArray); insertRow(temp_inv11,SparseArray); struct edge *temp22=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv22=(struct edge*)malloc(sizeof(struct edge)); temp22->i=30; temp22->j=22; temp22->weight=1; temp_inv22->i=temp22->j; temp_inv22->j=temp22->i; temp_inv22->weight=temp22->weight; insertCol(temp22,SparseArray); insertRow(temp22,SparseArray); insertCol(temp_inv22,SparseArray); insertRow(temp_inv22,SparseArray); struct edge *temp33=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv33=(struct edge*)malloc(sizeof(struct edge)); temp33->i=22; temp33->j=5; temp33->weight=1; temp_inv33->i=temp33->j; temp_inv33->j=temp33->i; temp_inv33->weight=temp33->weight; insertCol(temp33,SparseArray); insertRow(temp33,SparseArray); insertCol(temp_inv33,SparseArray); insertRow(temp_inv33,SparseArray); struct edge *temp44=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv44=(struct edge*)malloc(sizeof(struct edge)); temp44->i=5; temp44->j=19; temp44->weight=1; temp_inv44->i=temp44->j; temp_inv44->j=temp44->i; temp_inv44->weight=temp44->weight; insertCol(temp44,SparseArray); insertRow(temp44,SparseArray); insertCol(temp_inv44,SparseArray); insertRow(temp_inv44,SparseArray); struct edge *temp55=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv55=(struct edge*)malloc(sizeof(struct edge)); temp55->i=19; temp55->j=14; temp55->weight=1; temp_inv55->i=temp55->j; temp_inv55->j=temp55->i; temp_inv55->weight=temp55->weight; insertCol(temp55,SparseArray); insertRow(temp55,SparseArray); insertCol(temp_inv55,SparseArray); insertRow(temp_inv55,SparseArray); struct edge *temp66=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv66=(struct edge*)malloc(sizeof(struct edge)); temp66->i=19; temp66->j=2; temp66->weight=1; temp_inv66->i=temp66->j; temp_inv66->j=temp66->i; temp_inv66->weight=temp66->weight; insertCol(temp66,SparseArray); insertRow(temp66,SparseArray); insertCol(temp_inv66,SparseArray); insertRow(temp_inv66,SparseArray); struct edge *temp77=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv77=(struct edge*)malloc(sizeof(struct edge)); temp77->i=14; temp77->j=4; temp77->weight=1; temp_inv77->i=temp77->j; temp_inv77->j=temp77->i; temp_inv77->weight=temp77->weight; insertCol(temp77,SparseArray); insertRow(temp77,SparseArray); insertCol(temp_inv77,SparseArray); insertRow(temp_inv77,SparseArray); struct edge *temp88=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv88=(struct edge*)malloc(sizeof(struct edge)); temp88->i=2; temp88->j=1; temp88->weight=1; temp_inv88->i=temp88->j; temp_inv88->j=temp88->i; temp_inv88->weight=temp88->weight; insertCol(temp88,SparseArray); insertRow(temp88,SparseArray); insertCol(temp_inv88,SparseArray); insertRow(temp_inv88,SparseArray); struct edge *temp994=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv994=(struct edge*)malloc(sizeof(struct edge)); temp994->i=1; temp994->j=4; temp994->weight=1; temp_inv994->i=temp994->j; temp_inv994->j=temp994->i; temp_inv994->weight=temp994->weight; insertCol(temp994,SparseArray); insertRow(temp994,SparseArray); insertCol(temp_inv994,SparseArray); insertRow(temp_inv994,SparseArray); struct edge *temp99=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv99=(struct edge*)malloc(sizeof(struct edge)); temp99->i=2; temp99->j=4; temp99->weight=1; temp_inv99->i=temp99->j; temp_inv99->j=temp99->i; temp_inv99->weight=temp99->weight; insertCol(temp99,SparseArray); insertRow(temp99,SparseArray); insertCol(temp_inv99,SparseArray); insertRow(temp_inv99,SparseArray); struct edge *temp111=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv111=(struct edge*)malloc(sizeof(struct edge)); temp111->i=4; temp111->j=7; temp111->weight=1; temp_inv111->i=temp111->j; temp_inv111->j=temp111->i; temp_inv111->weight=temp111->weight; insertCol(temp111,SparseArray); insertRow(temp111,SparseArray); insertCol(temp_inv111,SparseArray); insertRow(temp_inv111,SparseArray); struct edge *temp222=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv222=(struct edge*)malloc(sizeof(struct edge)); temp222->i=7; temp222->j=17; temp222->weight=1; temp_inv222->i=temp222->j; temp_inv222->j=temp222->i; temp_inv222->weight=temp222->weight; insertCol(temp222,SparseArray); insertRow(temp222,SparseArray); insertCol(temp_inv222,SparseArray); insertRow(temp_inv222,SparseArray); struct edge *temp333=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv333=(struct edge*)malloc(sizeof(struct edge)); temp333->i=1; temp333->j=18; temp333->weight=1; temp_inv333->i=temp333->j; temp_inv333->j=temp333->i; temp_inv333->weight=temp333->weight; insertCol(temp333,SparseArray); insertRow(temp333,SparseArray); insertCol(temp_inv333,SparseArray); insertRow(temp_inv333,SparseArray); struct edge *temp3337=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv3337=(struct edge*)malloc(sizeof(struct edge)); temp3337->i=7; temp3337->j=18; temp3337->weight=1; temp_inv3337->i=temp3337->j; temp_inv3337->j=temp3337->i; temp_inv3337->weight=temp3337->weight; insertCol(temp3337,SparseArray); insertRow(temp3337,SparseArray); insertCol(temp_inv3337,SparseArray); insertRow(temp_inv3337,SparseArray); struct edge *temp444=(struct edge*)malloc(sizeof(struct edge)); struct edge *temp_inv444=(struct edge*)malloc(sizeof(struct edge)); temp444->i=21; temp444->j=18; temp444->weight=1; temp_inv444->i=temp444->j; temp_inv444->j=temp444->i; temp_inv444->weight=temp444->weight; insertCol(temp444,SparseArray); insertRow(temp444,SparseArray); insertCol(temp_inv444,SparseArray); insertRow(temp_inv444,SparseArray);} break; default: printf("\n wrong input\n"); } } //return 0; }