// Fichier arr1.icc // Exemple d'utilisation de tableaux // Appel: runcxx -f arr1.icc // Creation , remplissage d'une matrice TMatrix ma(7,9); ma = RegularSequence(0.1, 0.05); cout << "\n arr1.icc: ma = " << ma << endl; float min, max; // Utilisation des sous-tableaux ma(Range(2,4), Range(4,7)) = M_PI; cout << "\n Apres ma(Range(2,4), Range(4,7)) = " << ma << endl; // Appel de methodes ma.MinMax(min, max); cout << " MinMax(ma) : min= " << min << " max= " << max << endl; TMatrix sma = Sin(ma); cout << "\n test pour runcxx - sma = Sin(ma)= " << sma << endl; sma.MinMax(min, max); cout << " MinMax(sma) : min= " << min << " max= " << max << endl; // Vector , matrix multiplication Vector v1(5); v1 = 12.; Vector v2(5); v2 = 14; Matrix m = v2*v1.Transpose(); cout << " m= v2*v1.Transpose() : " << m; // Computing the scalar product cout << " v1.v2 = " << (v1.Transpose()*v2).toScalar() << endl;