Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.eda.actividad01;
- import java.util.ArrayList;
- public class Matriz<T> {
- private ArrayList<T> matriz;
- private int nDims;
- private int[] dimsMatriz;
- // Construir la matriz
- private void construir(int[] dim) {
- }
- }
- // Constructor
- public Matriz(int... d) {
- }
- // Calcular el numero total de elementos de la matriz
- public int totalElementos() {
- return matriz.size()*nDims;
- }
- // Determinar el desplazamiento equivalente en la matriz unidimensional
- public int desplazamiento(int[] subind) {
- // …
- }
- // Asignar un valor al elemento especificado de la matriz
- public void asignarDato(T dato, int... in) {
- }
- // Obtener el valor al elemento especificado de la matriz
- public T obtenerDato(int... in) {
- return null;
- }
- }
Add Comment
Please, Sign In to add comment