VertTimeList.h
Go to the documentation of this file.
00001 /***
00002  basic structure for vertex in frame, used for contructing spatial-temporal constraints.
00003  ***/
00004 #ifndef _VERTTIMELIST_H
00005 #define _VERTTIMELIST_H
00006 #include "dataStructure.h"
00007 #include <stdio.h>
00008 /*   Data structure for spatio-temporal relaxation   */
00009 typedef struct OneVertAtTime{
00010     int time_step;
00011     int which_vert;
00012     int variableID;
00013     bool isConstraint;
00014 }OneVertAtTime;
00015 
00016 
00017 class VertTimeList{
00018 public:
00019     OneVertAtTime **vertsTime;
00020     int nvertsTime;
00021     int curMaxNum;
00022     int total_notconstraint_verts;   // number of total nonconstrained vertices
00023     int nvertsPerFrame;              // number of vertices per frame
00024 
00025     /*  constructor   */
00026     VertTimeList(int nverts = 0, int initsize = 0);
00027 
00028     /*   destructor   */
00029     ~VertTimeList();
00030     /*  list operations  */
00031     void add_new(int time_step, int which_vert, bool isConstraint=false);
00032 
00033     void add_new(OneVertAtTime *oneVert);
00034 
00035     bool isFull();
00036 
00037     bool extend(int step=1000);
00038 
00039     void set_constraint_at_vert(int time_step, int which_vert);
00040 
00041     void reset_all_constraints();
00042 
00043     /*  return the slice index given the index of a variable   */
00044     int get_sliceID_given_varID(int variableID);
00045 };
00046 
00047 
00048 #endif


tensor_field_nav_core
Author(s): Lintao Zheng, Kai Xu
autogenerated on Thu Jun 6 2019 19:50:56